[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: DataBlock information Help



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]