xfs
[Top] [All Lists]

Re: Question related to XFS sync , especially fsync

To: Andi Kleen <andi@xxxxxxxxxxxxxx>
Subject: Re: Question related to XFS sync , especially fsync
From: David Chinner <dgc@xxxxxxx>
Date: Thu, 17 Jan 2008 13:44:43 +1100
Cc: Gopala Krishna <gopalakrishna.n.m@xxxxxxxxx>, Chris Wedgwood <cw@xxxxxxxx>, nscott@xxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <p73ejchkzv7.fsf@xxxxxxxxxxxxxx>
References: <d711080c0801140414n48e47140y88f545eba605eff9@xxxxxxxxxxxxxx> <20080114224245.GT155259@xxxxxxx> <d711080c0801150544i53d7abb2hbea659116ce0006b@xxxxxxxxxxxxxx> <478CCEAC.9010008@xxxxxxxxxxx> <1200436012.9463.184.camel@xxxxxxxxxxxxxxxxx> <d711080c0801152243h7613bbean9daeab8658f75408@xxxxxxxxxxxxxx> <20080116064840.GA5725@xxxxxxxxxxxxxxxxxx> <d711080c0801152325g3d57965dm92e3687a5f98c5f6@xxxxxxxxxxxxxx> <p73ejchkzv7.fsf@xxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Thu, Jan 17, 2008 at 02:25:00AM +0100, Andi Kleen wrote:
> "Gopala Krishna" <gopalakrishna.n.m@xxxxxxxxx> writes:
> 
> > we need to get information about
> > file like it's extent information and associated block numbers etc.
>  To
> > extract these there is no system call 
> 
> Actually there is the FIOBMAP ioctl for data blocks. e.g. it's used by
> boot loaders like lilo to create a block map to read a file without
> knowledge of the file system. Should work on all file systems that
> support lilo.

On XFS, you should use XFS_IOC_GETBMAPX. It's much faster
and returns lots more information than FIOBMAP. It can also
be used on the attribute fork of the inode, and it works on
directories as well.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


<Prev in Thread] Current Thread [Next in Thread>