Re: DataBlock information Help

Eric Sandeen <[email protected]>
Newsgroups gmane.comp.file-systems.ext3.user
Message-ID <[email protected]>
MirJafar Ali wrote:
> Hello,
> 
> I am using e2fsprogs and found it very nice. I want to know datablocks
> for a given a given file.
> I was going through the document and did lots of google search, but I am
> not sure what is the
> best way to get this information. Which "e2fsprogs" function can give
> all the datablock IDs. There
> is one function i.e. ext2fs_block_iterate, but I am not sure how it
> works. It wasn't clear from the
> document.
> 
> Can someone please help without getting angry on this simple question ?
> 
> Mir
> 

>From the commandline, you can just use filefrag (-v)

If you want to do it programatically, you can look at how filefrag uses
the FIBMAP and/or FIEMAP ioctls.

If you want to do it with the filesystem unmounted, you can look at
how the debugfs "stat" command shows you the blocks.

-Eric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.