linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 254: fix to pass subvolid=0 to set default btrfs subvolme
@ 2011-11-18  3:26 Li Zefan
  0 siblings, 0 replies; only message in thread
From: Li Zefan @ 2011-11-18  3:26 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs, linux-btrfs@vger.kernel.org

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>
---
 254 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/254 b/254
index 6320291..5216120 100755
--- 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
-- 1.7.3.1 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-18  3:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-18  3:26 [PATCH] 254: fix to pass subvolid=0 to set default btrfs subvolme Li Zefan

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).