linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fstests: common: Make _test_mount to include MOUNT_OPTIONS to allow consistent _test_cycle_mount
@ 2017-05-23  8:02 Qu Wenruo
  2017-05-23 11:13 ` Eryu Guan
  0 siblings, 1 reply; 11+ messages in thread
From: Qu Wenruo @ 2017-05-23  8:02 UTC (permalink / raw)
  To: linux-btrfs, fstests

[BUG]
If using MOUNT_OPTIONS="-o nodatasum" and btrfs to run genierc/142
generic/143 and generic/154, it will cause false alert like:
cp: failed to clone '/mnt/test/test-154/file2' from '/mnt/test/test-154/file1': Invalid argument

[REASON]
It is caused by _test_cycle_mount function, which unmount test device,
but when trying to re-mount it again using _test_mount(), we don't pass
$MOUNT_OPTIONS.

So this makes mount options differs between _test_cycle_mount().

And btrfs doesn't allow different csum flags between reflink source and
destination inodes, so it returns -EINVAL for reflink operation.

[FIX]
Fix it by passing $MOUNT_OPTIONS to _test_mount(), so that
_test_cycle_mount() won't cause different mount options.
So btrfs with "-o nodatasum" mount option can pass generic/14[23]
and generic/154 without false alert.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 common/rc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index ba215961..a591907c 100644
--- a/common/rc
+++ b/common/rc
@@ -522,7 +522,8 @@ _test_mount()
         return $?
     fi
     _test_options mount
-    _mount -t $FSTYP $TEST_OPTIONS $TEST_FS_MOUNT_OPTS $SELINUX_MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR
+    _mount -t $FSTYP $TEST_OPTIONS $TEST_FS_MOUNT_OPTS $SELINUX_MOUNT_OPTIONS \
+		$MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR
 }
 
 _test_unmount()
-- 
2.13.0




^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-05-25  3:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-23  8:02 [PATCH] fstests: common: Make _test_mount to include MOUNT_OPTIONS to allow consistent _test_cycle_mount Qu Wenruo
2017-05-23 11:13 ` Eryu Guan
2017-05-24  0:22   ` Qu Wenruo
2017-05-24  4:24     ` Eryu Guan
2017-05-24  4:28       ` Qu Wenruo
2017-05-24  5:08         ` Eryu Guan
2017-05-24  5:16           ` Qu Wenruo
2017-05-24  7:58             ` Qu Wenruo
2017-05-24  9:22               ` Eryu Guan
2017-05-24  9:27                 ` Qu Wenruo
2017-05-25  3:26                   ` Eryu Guan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).