To display indirect block numbers?
kashish bhatia
koolest77 at gmail.com
Tue Mar 1 15:18:47 EST 2011
Hi all ,
If I want to display block numbers of a file.
For instance file size is 64KB and block size is 4KB. So the data will
accommodate in 16 blocks.
Now I accessed an array named "i_block[ ]" present in ext2_inode structure.
This array stores the
block numbers of a file.
The first 12 blocks are direct blocks which will store 48KB data of file and
the 13th block will be single indirect block which will store the rest of
the data.
In this way I can directly get the data of 48KB by referring first 12 direct
blocks.
My question is how can I access this 13th block to get the remaining block
numbers which will directly point to rest of the data.
--
Regards,
Kashish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110302/144f5690/attachment.html
More information about the Kernelnewbies
mailing list