lkml.org 
[lkml]   [2004]   [Feb]   [26]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: filesystem logical block number
FromVladimir Saveliev <>
DateThu, 26 Feb 2004 11:14:14 +0300
Hello

On Thu, 2004-02-26 at 01:11, Yijian Wang wrote:
> Hello,
> 
> Does anybody know how to get the logical block numbers of file accesses?
> i.e. if I want to read some data from a file, how can I know which block
> numbers I am accessing? Is there any system call?
> 
#include <linux/fs.h>

ioctl (fd, FIBMAP, &block)

You have to run this as root, though

> Thank you!
> 
> regards,
> Yijian Wang
> 
> 
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:01    [from the cache]
©2003-2008