From: Liu Bo <liubo2009@cn.fujitsu.com>
To: Guenther Rasch <Guenther.Rasch@FernUni-Hagen.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Question about btrfs metadata structure
Date: Fri, 27 Jul 2012 15:34:05 +0800 [thread overview]
Message-ID: <5012446D.90302@cn.fujitsu.com> (raw)
In-Reply-To: <web-48902846@mailstore.fernuni-hagen.de>
On 07/25/2012 06:41 PM, Guenther Rasch wrote:
> Hi!
>
> I'm writing my bsc thesis about btrfs and I'm analyzing the
> btrfs metadata structure at the moment.
>
> I'm using fedora 17 with kernel 3.4 and btrfs-prog from your
> git-repository. For an overview I use "btrfs-debug-tree" and
> here are my questions:
>
> The root tree contains some inode_items, but I don't understand
> the meaning of them:
> item 4 key (ROOT_TREE_DIR INODE_ITEM 0) itemoff 3101 itemsize 160
> inode generation 3 size 0 block group 0 mode 40555 links 1
>
> item 5 key (ROOT_TREE_DIR INODE_REF 6) itemoff 3089 itemsize 12
> inode ref index 0 namelen 2 name: ..
>
> The key for an inode_item is objectid=ROOT_TREE_DIR. ROOT-TREE-DIR is
> the inode-Nr.?
> What does offset=6 regarding INODE_REF mean? --> item 5
>
I think you can find the answer by doing grep ROOT_TREE_DIR in btrfs-progs source code. ;)
> Also placed in the root tree, I've found entries of
> (FREE_SPACE UNTYPED ....)
> What does UNTYPED mean in this context and the offset is
> the logical address of a block group (I guess...)? This
> item has a pointer to an inode_item, is that right?
>
It's free space cache, which refers to free-space-cache.c in upstream's code.
> And last question about this entries:
> item 2 key (FS_TREE INODE_REF 6) itemoff 3500 itemsize 17
> inode ref index 0 namelen 7 name: default
> ...
> item 6 key (ROOT_TREE_DIR DIR_ITEM 2378154706) itemoff 3052 itemsize 37
> location key (FS_TREE ROOT_ITEM 18446744073709551615) type 2
> namelen 7 datalen 0 name: default
>
> There is an INODE_REF (again, offset 6...?) pointing to
> which inode? I cannot find some...
> What's about that offset in location key (FS_TREE....)
>
> Thx in advance for your patience and answers!
>
> Regards
> Guenther
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2012-07-27 7:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 10:41 Question about btrfs metadata structure Guenther Rasch
2012-07-27 7:07 ` Guenther Rasch
2012-07-27 7:21 ` Guenther Rasch
2012-07-27 7:34 ` Liu Bo [this message]
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=5012446D.90302@cn.fujitsu.com \
--to=liubo2009@cn.fujitsu.com \
--cc=Guenther.Rasch@FernUni-Hagen.de \
--cc=linux-btrfs@vger.kernel.org \
/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.