mirror_zfs/module/os/linux/zfs
Rob Norris 15a6b982c5 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
2025-09-17 16:34:14 -07:00
..
abd_os.c Prefer VERIFY0P(n) over VERIFY3P(n, ==, NULL) 2025-08-07 11:41:42 -07:00
arc_os.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
mmp_os.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
policy.c cred: properly pass and test creds on other threads (#17273) 2025-04-29 16:27:48 -07:00
qat_compress.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
qat_crypt.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
qat.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
spa_misc_os.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
trace.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_disk.c vdev_disk_close: take disk write lock before destroying it 2025-09-15 12:43:44 -07:00
vdev_label_os.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
vdev_raidz.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_acl.c Prefer VERIFY0P(n) over VERIFY(n == NULL) 2025-08-07 11:41:37 -07:00
zfs_ctldir.c Prefer VERIFY0P(n) over VERIFY3P(n, ==, NULL) 2025-08-07 11:41:42 -07:00
zfs_debug.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_dir.c Prefer VERIFY0(n) over VERIFY3U(n, ==, 0) 2025-08-07 11:41:25 -07:00
zfs_file_os.c Enable zhack to work properly with 4k sector size disks 2025-09-10 15:01:32 -07:00
zfs_ioctl_os.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_racct.c Wire O_DIRECT also to Uncached I/O (#17218) 2025-05-13 14:26:55 -07:00
zfs_sysfs.c Prefer VERIFY0P(n) over VERIFY(n == NULL) 2025-08-07 11:41:37 -07:00
zfs_uio.c linux/uio: remove "skip" offset for UIO_ITER 2025-05-11 12:46:40 -04:00
zfs_vfsops.c linux/super: add tunable to request immediate reclaim of unused dentries 2025-09-17 16:34:14 -07:00
zfs_vnops_os.c Linux: zfs_putpage: handle page writeback errors 2025-08-08 16:43:38 -07:00
zfs_znode_os.c Prefer VERIFY0P(n) over VERIFY3P(n, ==, NULL) 2025-08-07 11:41:42 -07:00
zio_crypt.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zpl_ctldir.c Linux 6.17: d_set_d_op() is no longer available 2025-09-09 17:06:55 -07:00
zpl_export.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zpl_file_range.c ioctl: remove FICLONE/FICLONERANGE/FIDEDUPERANGE compat 2025-05-08 10:32:52 -04:00
zpl_file.c Linux: zfs_putpage: handle page writeback errors 2025-08-08 16:43:38 -07:00
zpl_inode.c Prefer VERIFY0(n) over VERIFY(n == 0) 2025-08-07 11:40:59 -07:00
zpl_super.c linux/super: add tunable to request immediate reclaim of unused dentries 2025-09-17 16:34:14 -07:00
zpl_xattr.c Prefer VERIFY0P(n) over VERIFY3P(n, ==, NULL) 2025-08-07 11:41:42 -07:00
zvol_os.c zvol: stop using zvol_state_lock to protect OS-side private data 2025-08-19 10:06:34 -07:00