]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
254: fix to pass subvolid=0 to set default btrfs subvolme
authorLi Zefan <lizf@cn.fujitsu.com>
Fri, 18 Nov 2011 03:26:18 +0000 (11:26 +0800)
committerChristoph Hellwig <hch@lst.de>
Sun, 20 Nov 2011 19:44:31 +0000 (19:44 +0000)
The usage is 'btrfs subvolume set-default <id> <path>', not
'<path> <path>'.

The code happens to work because strotoull(path) returns 0, but it
will fail if in the future we check the argument more strict in
btrfs-progs.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
254

diff --git a/254 b/254
index 63202916b9382aa6267d7f1dfb2522961c1661e5..521612023c117c50f6963cb3e9020b6816c05c4c 100755 (executable)
--- a/254
+++ b/254
@@ -78,7 +78,7 @@ ls $SCRATCH_MNT/subvol
 echo "Creating file bar in subvol"
 dd if=/dev/zero of=$SCRATCH_MNT/subvol/bar bs=1M count=1 &> /dev/null
 echo "Setting subvol to the default"
-btrfs subvolume set-default $SCRATCH_MNT/subvol $SCRATCH_MNT/subvol | _filter_scratch
+btrfs subvolume set-default 0 $SCRATCH_MNT/subvol | _filter_scratch
 _scratch_remount
 echo "List root dir which is now subvol"
 ls $SCRATCH_MNT
@@ -88,7 +88,7 @@ _scratch_mount "-o subvolid=0"
 echo "List root dir"
 ls $SCRATCH_MNT
 echo "Setting the root dir as the default again"
-btrfs subvolume set-default $SCRATCH_MNT $SCRATCH_MNT | _filter_scratch
+btrfs subvolume set-default 0 $SCRATCH_MNT | _filter_scratch
 _scratch_remount
 echo "List root dir"
 ls $SCRATCH_MNT