-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove zpl_revalidate #9549
Remove zpl_revalidate #9549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for splitting this out and addressing the review feedback. This looks good to me after a rebase, and ends up being a nice simplification which is great.
include/sys/zfs_znode.h
Outdated
#define ZFS_EXIT(zfsvfs) \ | ||
do { \ | ||
zfs_exit_fs(zfsvfs); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Sorry to make you rebase this again, but as part of the ongoing refactoring we've moved these macros in to a platform specific include/os/linux/zfs/sys/zfs_znode_impl.h
header. One nice upshot of this is it does provide us more flexibility in adding Linux specific logic to the macro.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
@cyphar would you mind also reviewing this part of the larger overlayfs work. |
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. Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #9549 +/- ##
=========================================
- Coverage 79.35% 79.06% -0.3%
=========================================
Files 418 418
Lines 123686 123680 -6
=========================================
- Hits 98157 97788 -369
- Misses 25529 25892 +363
Continue to review full report at Codecov.
|
@behlendorf I see you tagged me here for a review. I can take a look if you want, but to be honest I really don't know much about dentries yet. It might be better if we found someone who knew what they were looking at there. |
@tcaputi no problem. I just wanted to tag you since I thought you might be interested in the changes related to rollback. |
👍 Removing |
I think that this introduced a bug: #9587 |
This patch removes the need for zpl_revalidate altogether.
There were 3 main reasons why we used d_revalidate:
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.
Fixes #8774
Signed-off-by: Pavel Snajdr [email protected]
How Has This Been Tested?
Locally & together with PR #9414
Types of changes
Checklist:
Signed-off-by
.