-
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
Stale directory entries after live-rollback #9587
Comments
@snajpa Could you take a look at this? |
According to the comment in #9549:
Are we sure that the dcache is actually completely flushed, even if there are open files? |
I believe you're right, the dentries for open files won't be dropped. This is why we originally settled on revalidate to determine if they were still valid after a rollback. It sounds like we'll need to find an alternate way to handle this so they're not visible after a rollback. Looking through the kernel source I don't immediately see a way to accomplish this. @snajpa unless you have a suggestion, why don't we revert #9549 while other options are investigated. |
@behlendorf yes, let's revert it. If open files are the only problem, we could track those and take care of the list of them on the |
One major upside to things now is that we don't have to bother with anything older than 3.10, so I need to walk around the Linux dcache code of that version more, but IIRC it's going to simplify things for me quite a bit. |
Reinstate the zpl_revalidate() functionality to resolve a regression where dentries for open files during a rollback are not invalidated. The unrelated functionality for automatically unmounting .zfs/snapshots was not reverted. Nor was the addition of shrink_dcache_sb() to the zfs_resume_fs() function. This issue was not immediately caught by the CI because the test case intended to catch it was included in the list of ZTS tests which may occasionally fail for unrelated reasons. Remove all of the rollback tests from this list to help identify the frequency of any spurious failures. The rollback_003_pos.ksh test case exposes a real issue with the long standing code which needs to be investigated. Regardless, it has been enable with a small workaround in the test case itself. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#9587
System information
Describe the problem you're observing
After
zfs rollback
on a mounted filesystem, some files which are no longer present still seem to be in the directory. This most likely due to dentry caching, which was recently modified by 5a6ac4c (#9549). This is causing zfs_rollback_001_pos to fail in our environment.Describe how to reproduce the problem
Run zfs_rollback_001_pos, or this simpler test program (thanks @jwk404):
The output will indicate that testfile1 is still present. However,
ls /testpool/testfs/festfile1
will fail. In terms of system calls, the test program (ksh) does:And
ls
does:Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: