mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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
This commit is contained in:
@@ -55,6 +55,7 @@ extern const struct file_operations zpl_dir_file_operations;
|
||||
extern void zpl_prune_sb(uint64_t nr_to_scan, void *arg);
|
||||
|
||||
extern const struct super_operations zpl_super_operations;
|
||||
extern const struct dentry_operations zpl_dentry_operations;
|
||||
extern const struct export_operations zpl_export_operations;
|
||||
extern struct file_system_type zpl_fs_type;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user