summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2009-12-14 19:18:38 +0000
committerChris Mason <chris.mason@oracle.com>2010-03-15 11:00:09 -0400
commit4849f01d153be0f52b8191ee1be0ce492aa96811 (patch)
tree39da0f94d126899f095a9f2b23bb3e38aa90bf46 /fs/btrfs
parent6ef5ed0d386be5c43ec66d6f2999919c0893558b (diff)
downloadblackbird-obmc-linux-4849f01d153be0f52b8191ee1be0ce492aa96811.tar.gz
blackbird-obmc-linux-4849f01d153be0f52b8191ee1be0ce492aa96811.zip
Btrfs: make subvolid=0 mount the original default root
Since theres not a good way to make sure the user sees the original default root tree id, and not to mention it's 5 so is way different than any other volume, just make subvol=0 mount the original default root. This makes it a bit easier for users to handle in the long run. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/super.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index f878337cee6f..9771eb8694b6 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -325,9 +325,15 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
break;
case Opt_subvolid:
intarg = 0;
- match_int(&args[0], &intarg);
- if (intarg)
- *subvol_objectid = intarg;
+ error = match_int(&args[0], &intarg);
+ if (!error) {
+ /* we want the original fs_tree */
+ if (!intarg)
+ *subvol_objectid =
+ BTRFS_FS_TREE_OBJECTID;
+ else
+ *subvol_objectid = intarg;
+ }
break;
case Opt_device:
error = btrfs_scan_one_device(match_strdup(&args[0]),
OpenPOWER on IntegriCloud