Re: double indirect block+inode




eksamor@xxxxxxxxx wrote:
Ok that makes sense. If there is 15 pointers where the first 12 are
direct pointers to data block and the last 3 are pointers to indirect
blocks (single, double, triple) would the first pointer then point to
the first data block of the file and the last used pointer point to the
last block of data for the file?


This is usenet, please quote properly.

The first twelve pointers (#0-#11) in the inode will point to the first
twelve data blocks in the file (#0-#11). Assuming 4K blocks and 32 bit
pointers: Inode pointer #12 will point to the single indirect block,
which in turn points to data blocks 12-1035, #13 points to the double
indirect block, which in turn covers data blocks 1036-1049611, and
pointer #14 in the inode points to the triple indirect block which
covers data blocks 1049612-1074791435.

As an example, if the last block in the file is #3000, it would be
pointed to by the 965th entry in the second single indirect block
pointed to by the double indirect block pointed to by pointer #13 in
the inode.

Always assuming my arithmetic is correct...

.



Relevant Pages

  • Re: Whats the point of Veritas?
    ... > scanned the data blocks in the current extent, ... pointed to directly by the inode. ... you go to the 14th which is a double indirect and so on. ... It also can use an 11th pointer to an indirect extent pointer ...
    (comp.unix.solaris)
  • Re: Nand Flash question
    ... > are using the wrong medium. ... The addressable units were small data blocks. ... of the previous data in the sector, then added a pointer to point to ... the new block in front of a pointer to the old block. ...
    (comp.arch.embedded)