xfs
[Top] [All Lists]

[PATCH 3/3] generic/009: get the correct dev name when testing ext4

To: xfs@xxxxxxxxxxx
Subject: [PATCH 3/3] generic/009: get the correct dev name when testing ext4
From: Eryu Guan <eguan@xxxxxxxxxx>
Date: Thu, 17 Apr 2014 12:16:54 +0800
Cc: Eryu Guan <eguan@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1397708214-8197-1-git-send-email-eguan@xxxxxxxxxx>
References: <1397708214-8197-1-git-send-email-eguan@xxxxxxxxxx>
If TEST_DEV is a symlink(usually a lvm), we get the wrong DEV
name. Follow link and get the correct dev name.

Signed-off-by: Eryu Guan <eguan@xxxxxxxxxx>
---
 tests/generic/009 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/009 b/tests/generic/009
index 1e487b4..7675c69 100644
--- a/tests/generic/009
+++ b/tests/generic/009
@@ -51,7 +51,7 @@ testfile=$TEST_DIR/009.$$
 
 # Disable extent zeroing for ext4 as that change where holes are created
 if [ "$FSTYP" = "ext4" ]; then
-       DEV=`basename $TEST_DEV`
+       DEV=`basename $(readlink -f $TEST_DEV)`
        echo 0 >/sys/fs/ext4/$DEV/extent_max_zeroout_kb
 fi
 
-- 
1.9.0

<Prev in Thread] Current Thread [Next in Thread>