Hi Eric,<br><br>I have understood from the document, that for each file, we have 3 extra blocks (indirect) that refer to  :<br><br>- the group descriptor<br>- the block bitmap<br>- the inode bitmap<br><br>Is that right?<br>
<br>If not, to what the indirect blocks refer to? and are there always only 3 blocks for each file in ext2/3fs?<br><br>Best regards<br><br>youness<br><br><div class="gmail_quote">On Tue, Aug 18, 2009 at 4:45 PM, Eric Sandeen <span dir="ltr"><<a href="mailto:sandeen@redhat.com">sandeen@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Youness HAFFANE wrote:<br>
><br>
> Hi,<br>
><br>
> I'm trying to understand why extra blocks are added when you create a<br>
> file in the ext3 fs:<br>
><br>
> for example, let's create a file of 1111 blocks (4096 bytes for each block)<br>
><br>
> $ dd if=/dev/zero of=foo bs=4096 count=1111<br>
><br>
> the real occupation disk is then:<br>
><br>
> $ du -B 4096 foo<br>
> 1114<br>
><br>
> instead of 1111<br>
><br>
> So where the 3 extra blocks come from?<br>
<br>
</div></div>from the indirect blocks.  This is how ext2/3 keep track of the layout<br>
of the file.<br>
<br>
see <a href="http://e2fsprogs.sourceforge.net/ext2intro.html" target="_blank">http://e2fsprogs.sourceforge.net/ext2intro.html</a><br>
and in particular the diagram:<br>
<a href="http://e2fsprogs.sourceforge.net/ext2-inode.gif" target="_blank">http://e2fsprogs.sourceforge.net/ext2-inode.gif</a><br>
in that paper.<br>
<br>
-Eric<br>
<br>
> Thanks for help!<br>
><br>
> youness<br>
><br>
> --<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Y.<br>