mirror_zfs/module/os/linux/zfs
Rob Norris 00ee7f9430 linux/super: add tunable to request immediate reclaim of unused dentries
Traditionally, unused dentries would be cached in the dentry cache until
the associated entry is no longer on disk. The cached dentry continues
to hold an inode reference, causing the inode to be pinned (see previous
commit).

Here we implement the dentry op d_delete, which is roughly analogous to
the drop_inode superblock op, and add a zfs_delete_dentry tunable to
control its behaviour. By default it continues the traditional
behaviour, but when the tunable is enabled, we signal that an unused
dentry should be freed immediately, releasing its inode reference, and
so allowing that inode to be deleted if no longer in use.

Sponsored-by: Klara, Inc.
Sponsored-by: Fastmail Pty Ltd
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17746
2026-02-11 16:18:01 -08:00
..
abd_os.c Fix a declaration position of the nth_page. 2026-02-11 13:33:19 -08:00
arc_os.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
mmp_os.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
policy.c cred: properly pass and test creds on other threads (#17273) 2025-05-28 16:00:28 -07:00
qat_compress.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
qat_crypt.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
qat.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
spa_misc_os.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
trace.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
vdev_disk.c tunables: fix spelling 2025-06-17 10:50:26 -07:00
vdev_label_os.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
vdev_raidz.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs_acl.c dmu_tx: rename dmu_tx_assign() flags from TXG_* to DMU_TX_* (#17143) 2025-04-16 09:59:45 -07:00
zfs_ctldir.c Linux: sync: remove async/sync accounting 2025-08-12 17:23:39 -07:00
zfs_debug.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs_dir.c dmu_tx: rename dmu_tx_assign() flags from TXG_* to DMU_TX_* (#17143) 2025-04-16 09:59:45 -07:00
zfs_file_os.c Enable zhack to work properly with 4k sector size disks 2026-02-11 13:33:12 -08:00
zfs_ioctl_os.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs_racct.c SPDX: license tags: BSD-2-Clause 2025-04-16 09:59:44 -07:00
zfs_sysfs.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zfs_uio.c Fix HIGHMEM/kmap API violation in zfs_uiomove_bvec_impl() 2025-12-19 19:55:14 -08:00
zfs_vfsops.c linux/super: add tunable to request immediate reclaim of unused dentries 2026-02-11 16:18:01 -08:00
zfs_vnops_os.c Linux: zfs_putpage: document (and fix!) confusing sync/commit modes 2025-08-12 17:23:46 -07:00
zfs_znode_os.c Linux: sync: remove async/sync accounting 2025-08-12 17:23:39 -07:00
zio_crypt.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpl_ctldir.c Linux 6.17: d_set_d_op() is no longer available 2025-10-21 10:36:35 -07:00
zpl_export.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zpl_file_range.c ioctl: remove FICLONE/FICLONERANGE/FIDEDUPERANGE compat 2025-06-17 10:50:27 -07:00
zpl_file.c Linux 6.18: replace write_cache_pages() 2025-12-17 11:24:44 -08:00
zpl_inode.c Linux 6.15: mkdir now returns struct dentry * 2025-05-28 16:00:28 -07:00
zpl_super.c linux/super: add tunable to request immediate reclaim of unused dentries 2026-02-11 16:18:01 -08:00
zpl_xattr.c SPDX: license tags: CDDL-1.0 2025-04-16 09:59:44 -07:00
zvol_os.c Linux 6.18: block_device_operations->getgeo takes struct gendisk* 2025-12-17 11:24:44 -08:00