ZTS: Fix rollback_003_pos.ksh
Under Linux when rolling back a mounted filesystem negative dentries may not be dropped from the cache. This can result in an ENOENT being incorrectly returned on first access. Issuing a `df` before the unmount results in the negative dentries being invalidated and side steps the issue. This is solely a workaround for the test case on Linux and not correct behavior. The core issue of invalidating negative dentries needs to be handled with a kernel side change. This is being tracked as issue #6143. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #12898 Issue #6143
This commit is contained in:
parent
9ba5d8d204
commit
d2f374c3f2
@ -294,7 +294,6 @@ elif sys.platform.startswith('linux'):
|
||||
'mmp/mmp_active_import': ['FAIL', known_reason],
|
||||
'mmp/mmp_exported_import': ['FAIL', known_reason],
|
||||
'mmp/mmp_inactive_import': ['FAIL', known_reason],
|
||||
'snapshot/rollback_003_pos': ['FAIL', known_reason],
|
||||
'zvol/zvol_misc/zvol_misc_snapdev': ['FAIL', '12621'],
|
||||
'zvol/zvol_misc/zvol_misc_volmode': ['FAIL', known_reason],
|
||||
})
|
||||
|
@ -121,6 +121,13 @@ function cleanup_pool
|
||||
log_must rm -rf $BACKDIR/*
|
||||
|
||||
if is_global_zone ; then
|
||||
#
|
||||
# Linux: Issuing a `df` seems to properly force any negative
|
||||
# dcache entries to be invalidated preventing failures when
|
||||
# accessing the mount point. Additional investigation required.
|
||||
#
|
||||
# https://github.com/openzfs/zfs/issues/6143
|
||||
#
|
||||
log_must df >/dev/null
|
||||
log_must_busy zfs destroy -Rf $pool
|
||||
else
|
||||
|
@ -92,6 +92,15 @@ log_note "Verify rollback of multiple nested file systems succeeds."
|
||||
log_must zfs snapshot $TESTPOOL/$TESTFILE@$TESTSNAP
|
||||
log_must zfs snapshot $SNAPPOOL.1
|
||||
|
||||
#
|
||||
# Linux: Issuing a `df` seems to properly force any negative dcache entries to
|
||||
# be invalidated preventing failures when accessing the mount point. Additional
|
||||
# investigation required.
|
||||
#
|
||||
# https://github.com/openzfs/zfs/issues/6143
|
||||
#
|
||||
log_must df >/dev/null
|
||||
|
||||
export __ZFS_POOL_RESTRICT="$TESTPOOL"
|
||||
log_must zfs unmount -a
|
||||
log_must zfs mount -a
|
||||
@ -100,12 +109,6 @@ unset __ZFS_POOL_RESTRICT
|
||||
log_must touch /$TESTPOOL/$TESTFILE/$TESTFILE.1
|
||||
|
||||
log_must zfs rollback $SNAPPOOL.1
|
||||
|
||||
#
|
||||
# Workaround for issue #6143. Issuing a `df` seems to properly force any
|
||||
# negative dcache entries to be invalidated preventing subsequent failures
|
||||
# when accessing the mount point. Additional investigation required.
|
||||
#
|
||||
log_must df
|
||||
log_must df >/dev/null
|
||||
|
||||
log_pass "Rollbacks succeed when nested file systems are present."
|
||||
|
Loading…
Reference in New Issue
Block a user