From: Alex Lyakas <alex.bolshoy.btrfs@gmail.com>
To: Liu Bo <liubo2009@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] Btrfs: fix btrfs_is_free_space_inode to recognize btree inode
Date: Wed, 18 Jul 2012 15:39:14 +0300 [thread overview]
Message-ID: <CAHf9xvYb8TAw3VMccRZzWuDF2N+arWvNuAXkApSxRmuRMUNexQ@mail.gmail.com> (raw)
In-Reply-To: <5006A5E8.4050907@cn.fujitsu.com>
On Wed, Jul 18, 2012 at 3:02 PM, Liu Bo <liubo2009@cn.fujitsu.com> wrote:
> On 07/18/2012 06:02 PM, Alex Lyakas wrote:
>
> More or less.
>
> As its name shows, a free space inode's data (you name it extents) consists of
> free space info, meanwhile, a free space inode is issued to a block group,
> so the free space info actually stands for free space in the block group:
>
> |<- a block group len ->|
> |----vvv----vvv-------vvv-----|
>
> 'v' : occupied.
> '-' : available. (free space)
>
> these free space info are indexed in a rbtree in memory, and each entry has [start, len].
Thanks, it makes sense with what I saw in the code, just could not
figure how this free-space inode's data is being read into memory.
>
>> Also, I don't see anywhere BTRFS_BTREE_INODE_OBJECTID in the tree root
>> tree. So what is this "btree inode" that you mention?
>>
>
>
> The code refers to disk_io.c, in the function 'open_ctree()' you can see the definition.
>
I saw it there, but not on disk. So now I see that it's kind of a
special "top" inode, used for ... something, and this inode is not
stored anywhere on-disk.
Thanks, now I understand your patch. Also, I understand now that
FREE_INO items sit in the subvolume file tree (and perhaps also in the
root tree), because they need to track free inos for distinct ino
spaces.
> Basically btree inode's data stands for btrfs's metadata, I think you can find something
> in btrfs's wiki page?
>
>
> And thanks for your energy on btrfs! :)
Thanks for helping.
Alex.
prev parent reply other threads:[~2012-07-18 12:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 11:28 [PATCH 1/2] Btrfs: fix btrfs_is_free_space_inode to recognize btree inode Liu Bo
2012-07-10 11:28 ` [PATCH 2/2] Btrfs: kill root from btrfs_is_free_space_inode Liu Bo
2012-07-17 13:43 ` David Sterba
2012-07-18 1:03 ` Liu Bo
2012-07-18 10:02 ` [PATCH 1/2] Btrfs: fix btrfs_is_free_space_inode to recognize btree inode Alex Lyakas
2012-07-18 12:02 ` Liu Bo
2012-07-18 12:39 ` Alex Lyakas [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=CAHf9xvYb8TAw3VMccRZzWuDF2N+arWvNuAXkApSxRmuRMUNexQ@mail.gmail.com \
--to=alex.bolshoy.btrfs@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=liubo2009@cn.fujitsu.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;
as well as URLs for NNTP newsgroup(s).