xfs
[Top] [All Lists]

Re: Question related to XFS sync , especially fsync

To: Gopala Krishna <gopalakrishna.n.m@xxxxxxxxx>
Subject: Re: Question related to XFS sync , especially fsync
From: Iustin Pop <iusty@xxxxxxxxx>
Date: Wed, 16 Jan 2008 08:52:15 +0100
Cc: Chris Wedgwood <cw@xxxxxxxx>, nscott@xxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <d711080c0801152325g3d57965dm92e3687a5f98c5f6@xxxxxxxxxxxxxx>
Mail-followup-to: Gopala Krishna <gopalakrishna.n.m@xxxxxxxxx>, Chris Wedgwood <cw@xxxxxxxx>, nscott@xxxxxxxxxx, xfs@xxxxxxxxxxx
References: <d711080c0801140414n48e47140y88f545eba605eff9@xxxxxxxxxxxxxx> <20080114224245.GT155259@xxxxxxx> <d711080c0801150544i53d7abb2hbea659116ce0006b@xxxxxxxxxxxxxx> <478CCEAC.9010008@xxxxxxxxxxx> <1200436012.9463.184.camel@xxxxxxxxxxxxxxxxx> <d711080c0801152243h7613bbean9daeab8658f75408@xxxxxxxxxxxxxx> <20080116064840.GA5725@xxxxxxxxxxxxxxxxxx> <d711080c0801152325g3d57965dm92e3687a5f98c5f6@xxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.17+20080114 (2008-01-14)
On Wed, Jan 16, 2008 at 12:55:17PM +0530, Gopala Krishna wrote:
> If there is a user level system call to deal with the extent information
> etc, we can use , but many file system is not providing that. Basically if
> we give file it should eb in aposition to display metadata informations
> including extents and corresponding logical block numbers and device
> offsets.
> 
> I have to do it programitically and hence if I have some system call rather
> than command, that would be helpful. Freeze/unfreeze is a command it seems
> right?

Well, most commands are backed by a system call, right? For example,
strace xfs_freeze to see what system calls it does. IIRC, only xfs_db
has to access the raw device.

For the block mapping, look at xfs_bmap (and its backend xfs_io), which
should do exactly what you want.

iustin


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