* [PATCH] defrag: test $TEST_DEV for extents for ext4 defrag
@ 2016-06-09 18:41 Theodore Ts'o
0 siblings, 0 replies; only message in thread
From: Theodore Ts'o @ 2016-06-09 18:41 UTC (permalink / raw)
To: fstests; +Cc: Theodore Ts'o
Commit 902223bdbbf2: "defrag: require extents support for ext4 defrag"
added a test to make sure the ext4 file system has extents enabled by
testing the scratch device. Unfortunately at the time when
_require_defrag is run, the scratch file system hasn't been
initialized yet by the test, so its contents are undefined.
If the previous test explicitly creates a file system with extents
disabled on $SCRATCH_DEV (such as ext4/306), then subsequent tests
(e.g., ext4/307 and ext4/306) will refuse to run.
Fix this by testing $TEST_DEV instead of $SCRATCH_DEV.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
common/defrag | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/defrag b/common/defrag
index 44fc536..7db0cb4 100644
--- a/common/defrag
+++ b/common/defrag
@@ -33,7 +33,7 @@ _require_defrag()
else
DEFRAG_PROG="$E4DEFRAG_PROG"
fi
- dumpe2fs -h $SCRATCH_DEV 2> /dev/null | grep -wq extent || \
+ dumpe2fs -h $TEST_DEV 2> /dev/null | grep -wq extent || \
_notrun "file system does not have extents, needed for defrag"
;;
btrfs)
--
2.5.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-09 18:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-09 18:41 [PATCH] defrag: test $TEST_DEV for extents for ext4 defrag Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox