From: Li Zefan <lizf@cn.fujitsu.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: [PATCH] 254: fix to pass subvolid=0 to set default btrfs subvolme
Date: Fri, 18 Nov 2011 11:26:18 +0800 [thread overview]
Message-ID: <4EC5D05A.4000503@cn.fujitsu.com> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: Li Zefan <lizf@cn.fujitsu.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
xfs@oss.sgi.com
Subject: [PATCH] 254: fix to pass subvolid=0 to set default btrfs subvolme
Date: Fri, 18 Nov 2011 11:26:18 +0800 [thread overview]
Message-ID: <4EC5D05A.4000503@cn.fujitsu.com> (raw)
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2011-11-18 3:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-18 3:26 Li Zefan [this message]
2011-11-18 3:26 ` [PATCH] 254: fix to pass subvolid=0 to set default btrfs subvolme Li Zefan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC5D05A.4000503@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.