linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Felipe Monteiro de Carvalho <felipemonteiro.carvalho@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Too large value in inode.i_blocks[1]
Date: Mon, 1 Jul 2013 13:02:15 -0400	[thread overview]
Message-ID: <20130701170215.GC23896@thunk.org> (raw)
In-Reply-To: <CACyNnZNF6E6rY7oiBX084cuoT+aUMnyhQA_uJFr4=wnPwGAVwA@mail.gmail.com>

On Mon, Jul 01, 2013 at 05:15:21PM +0200, Felipe Monteiro de Carvalho wrote:
> On Wed, Jun 12, 2013 at 3:52 PM, Theodore Ts'o <tytso@mit.edu> wrote:
> > The ext4_extent_tail is not used in i_blocks[].  There will be up to 4
> > ext4_extent structures, or ext4_extent_idx structures, depending on
> > the depth of the tree.  The ext4_extent_idx structures are used for
> > the interior inodes of the tree.  The ext4_extent structures are used
> > for the leaf nodes of the tree.  The ext4_extent_tail is used in
> > extent tree blocks so we can checksum the metadata if the
> > metadata_csum feature is enabled.  The entire inode is checksummed, so
> > we don't need the ext4_extent_tail in i_blocks[].
> 
> Hello,
> 
> thanks, this part I understood fairly well, but what if eh_entries is
> 8, for example .... where are the other 4 structures?

For the root node which is located in the inode, that would be
illegal.  There is only room for four entries in the root node.  If an
inode needs more extents than that, then we have to have an extent
leaf tree block in an external 4k block and the root inode will point
to up to four extent tree leaf blocks.  If there are more than four
leaf blocks, then the tree would have to grow in depth again, and the
root node would contain a pointer to up to four index blocks, and each
index node block can point to up to 340 leaf tree blocks.  (Assuming a 4k block size)

Basically, this is a standard tree data structure.

       	   	       	   	      	  	 - Ted

      reply	other threads:[~2013-07-01 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12  5:08 Too large value in inode.i_blocks[1] Felipe Monteiro de Carvalho
2013-06-12 12:59 ` Theodore Ts'o
2013-06-12 13:34   ` Felipe Monteiro de Carvalho
2013-06-12 13:52     ` Theodore Ts'o
2013-06-12 14:25       ` Eric Sandeen
2013-07-01 15:15       ` Felipe Monteiro de Carvalho
2013-07-01 17:02         ` Theodore Ts'o [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=20130701170215.GC23896@thunk.org \
    --to=tytso@mit.edu \
    --cc=felipemonteiro.carvalho@gmail.com \
    --cc=linux-ext4@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 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).