From 5a6ac4cffcd0255ca6f730bcf356e12891fd18af Mon Sep 17 00:00:00 2001 From: Pavel Snajdr Date: Mon, 11 Nov 2019 18:34:21 +0100 Subject: Remove zpl_revalidate This patch removes the need for zpl_revalidate altogether. There were 3 main reasons why we used d_revalidate: 1. periodic automounted snapshots umount deferral 2. negative dentries created before snapshot rollback 3. stale inodes referenced by dentry cache after snapshot rollback Periodic snapshots deferral solution introduces zfs_exit_fs function, which is called as a part of ZFS_EXIT(zfsvfs_t) macro. Negative dentries and stale inodes are solved by flushing the dcache for the particular dataset on zfs_resume_fs call. This patch also removes now unused HAVE_S_D_OP configure test. Reviewed-by: Aleksa Sarai Reviewed-by: Brian Behlendorf Signed-off-by: Pavel Snajdr Closes #8774 Closes #9549 --- include/os/linux/zfs/sys/zfs_vfsops.h | 1 + include/os/linux/zfs/sys/zfs_znode_impl.h | 1 + include/os/linux/zfs/sys/zpl.h | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/os/linux/zfs/sys/zfs_vfsops.h b/include/os/linux/zfs/sys/zfs_vfsops.h index 3a959996f..26e49d7b4 100644 --- a/include/os/linux/zfs/sys/zfs_vfsops.h +++ b/include/os/linux/zfs/sys/zfs_vfsops.h @@ -197,6 +197,7 @@ typedef struct zfid_long { extern int zfs_suspend_fs(zfsvfs_t *zfsvfs); extern int zfs_resume_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds); extern int zfs_end_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds); +extern void zfs_exit_fs(zfsvfs_t *zfsvfs); extern int zfs_userspace_one(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type, const char *domain, uint64_t rid, uint64_t *valuep); extern int zfs_userspace_many(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type, diff --git a/include/os/linux/zfs/sys/zfs_znode_impl.h b/include/os/linux/zfs/sys/zfs_znode_impl.h index 0ecfb0a90..65abf4ca9 100644 --- a/include/os/linux/zfs/sys/zfs_znode_impl.h +++ b/include/os/linux/zfs/sys/zfs_znode_impl.h @@ -84,6 +84,7 @@ do { \ /* Must be called before exiting the operation. */ #define ZFS_EXIT(zfsvfs) \ do { \ + zfs_exit_fs(zfsvfs); \ rrm_exit(&(zfsvfs)->z_teardown_lock, FTAG); \ } while (0) #define ZPL_EXIT(zfsvfs) ZFS_EXIT(zfsvfs) diff --git a/include/os/linux/zfs/sys/zpl.h b/include/os/linux/zfs/sys/zpl.h index 2766269f3..01f0f6f38 100644 --- a/include/os/linux/zfs/sys/zpl.h +++ b/include/os/linux/zfs/sys/zpl.h @@ -45,7 +45,6 @@ extern const struct inode_operations zpl_inode_operations; extern const struct inode_operations zpl_dir_inode_operations; extern const struct inode_operations zpl_symlink_inode_operations; extern const struct inode_operations zpl_special_inode_operations; -extern dentry_operations_t zpl_dentry_operations; /* zpl_file.c */ extern ssize_t zpl_read_common(struct inode *ip, const char *buf, -- cgit v1.2.3