All of
 help / color / mirror / Atom feed
From: Josef Bacik <>
Subject: [PATCH] Btrfs: make subvol=0 mount the original default root
Date: Mon, 14 Dec 2009 14:18:38 -0500	[thread overview]
Message-ID: <20091214191838.GC2165@localhost.localdomain> (raw)

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 <>
 fs/btrfs/super.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index bcbdc1b..ccc0380 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -305,9 +305,15 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
 		switch (token) {
 		case Opt_subvol:
 			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 =
+				else
+					*subvol_objectid = intarg;
+			}
 		case Opt_device:
 			error = btrfs_scan_one_device(match_strdup(&args[0]),

                 reply	other threads:[~2009-12-14 19:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091214191838.GC2165@localhost.localdomain \ \ \ \

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