From: Goffredo Baroncelli <kreijack@inwind.it>
To: Shriramana Sharma <samjnaa@gmail.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: root subvol id is 0 or 5?
Date: Sun, 30 Nov 2014 08:48:49 +0100 [thread overview]
Message-ID: <547ACBE1.6080506@inwind.it> (raw)
In-Reply-To: <CAH-HCWWVR=g6mZFZyu6wYRfP7Harr5bxokJi+_qW8QHsniFPFg@mail.gmail.com>
On 11/30/2014 04:31 AM, Shriramana Sharma wrote:
> I am confused with this: should I call it the "root subvol" or
> "top-level subvol" or "default subvol" or doesn't it matter? Are all
> subvols equal, or some are more equal than others [hark to Orwell's
> Animal Farm ;-)]?
>
> And more importantly, is the ID of the root subvol 0 or 5?
IIRC the real ID is 5. But if you pass 0, this value is converted in 5
$ grep BTRFS_FS_TREE_OBJECTID *.h
ctree.h:#define BTRFS_FS_TREE_OBJECTID 5ULL
[...]
And in super.c:
[...]
case Opt_subvolid:
num = match_strdup(&args[0]);
if (num) {
*subvol_objectid = memparse(num, NULL);
kfree(num);
/* we want the original fs_tree */
if (!*subvol_objectid)
*subvol_objectid =
BTRFS_FS_TREE_OBJECTID;
[...]
--
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5
next prev parent reply other threads:[~2014-11-30 7:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-30 3:31 root subvol id is 0 or 5? Shriramana Sharma
2014-11-30 7:48 ` Goffredo Baroncelli [this message]
2014-11-30 11:59 ` Hugo Mills
2014-11-30 13:38 ` Shriramana Sharma
2014-11-30 13:42 ` Shriramana Sharma
2015-02-27 16:50 ` David Sterba
2014-11-30 13:53 ` Hugo Mills
2014-12-01 3:49 ` Duncan
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=547ACBE1.6080506@inwind.it \
--to=kreijack@inwind.it \
--cc=linux-btrfs@vger.kernel.org \
--cc=samjnaa@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox