-
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 usage of d_revalidate #8774
Comments
That's right. You might be able to do something relatively straight forward like invalidate the entire dentry cache as part of the rollback. That wouldn't be great for performance, but rollbacks should be a rare operation. The only other gotcha here is that |
Maybe a noob question: why would the entire dcache need to be invalidated? My understanding is, that dcache can be flushed per superblock instance, as is already done in the rollback path @ And as for the automounted snapshots, would a new taskq dedicated to periodically calling Is that approach OK? I'd like to take this one on, but I'll need a little guidance, please ;) |
Well, with a little ugly hack to make Docker run without a patch (so it doesn't detect ZFS and runs with OverlayFS) - I've got OverlayFS with unpatched Docker in LXC container now :) https://github.com/vpsfreecz/zfs/commits/ovl Example docker session: https://paste.vpsfree.cz/Onh4XtG5/ @cyphar would you mind if I send this as a new PR for a fresh review? |
@snajpa I don't mind you sending it as long as you keep my
|
I'll keep your original patches as you wrote them (+-, only they're rebased) - if that's not in conflict with some guidelines I've yet to read :) |
I'm not exactly clear on a few details, so I've started a disscussion on zfs-devel (as I'll go ahead and try to rewrite this without the new txtypes for me to test anyway). Best way for me to learn is to fail often and fast :-D https://zfsonlinux.topicbox.com/groups/zfs-devel/Tebb527f71cbeed1e/spafeatureincr-decr-context |
Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
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 The way I dealt with this is simply to defer the umount on each ZFS_EXIT on the mount's zfsvfs. 2. negative dentries created before snapshot rollback 3. stale inodes referenced by dentry cache after snapshot rollback was solved by flushing dcache for the given mount. Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
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 The way I dealt with this is simply to defer the umount on each ZFS_EXIT on the mount's zfsvfs. 2. negative dentries created before snapshot rollback 3. stale inodes referenced by dentry cache after snapshot rollback was solved by flushing dcache for the given mount. Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
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 The way I dealt with this is simply to defer the umount on each ZFS_EXIT on the mount's zfsvfs. 2. negative dentries created before snapshot rollback 3. stale inodes referenced by dentry cache after snapshot rollback was solved by flushing dcache for the given mount. Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
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 The way I dealt with this is simply to defer the umount on each ZFS_EXIT on the mount's zfsvfs. 2. negative dentries created before snapshot rollback 3. stale inodes referenced by dentry cache after snapshot rollback was solved by flushing dcache for the given mount. Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
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 The way I dealt with this is simply to defer the umount on each ZFS_EXIT on the mount's zfsvfs. 2. negative dentries created before snapshot rollback 3. stale inodes referenced by dentry cache after snapshot rollback was solved by flushing dcache for the given mount. Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
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 The way I dealt with this is simply to defer the umount on each ZFS_EXIT on the mount's zfsvfs. 2. negative dentries created before snapshot rollback 3. stale inodes referenced by dentry cache after snapshot rollback was solved by flushing dcache for the given mount. Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
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 The way I dealt with this is simply to defer the umount on each ZFS_EXIT on the mount's zfsvfs. 2. negative dentries created before snapshot rollback 3. stale inodes referenced by dentry cache after snapshot rollback was solved by flushing dcache for the given mount. Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
@behlendorf Can you re-open this, since I think the zpl_revalidate change was reverted? It will be fixed in my carry of #9414 but probably best to keep it open until it's fixed. |
Sure, reopened. |
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions. |
Still an issue. |
This is a tracking issue for the main blocker of #8648, which is that ZFS makes use of
d_revalidate
. This leads to Linux treating ZFS as a "remote" filesystem (like NFS) and thus things likeoverlayfs
won't work with ZFS.It seems to me that the solution is to make it so that rollbacks (which appear to be the only reason we have
zpl_revalidate
) correctly invalidate the dcache so that we don't need to used_revalidate
(but I'm not super familiar with dcache internals so this is going to be fun).The text was updated successfully, but these errors were encountered: