[Top] [All Lists]

Re: Question related to XFS sync , especially fsync

To: "David Chinner" <dgc@xxxxxxx>, "Chris Wedgwood" <cw@xxxxxxxx>, "Matthias Schniedermeyer" <ms@xxxxxxx>, "Olaf Frączyk" <olaf@xxxxxxxxxxxxx>, "Andi Kleen" <andi@xxxxxxxxxxxxxx>
Subject: Re: Question related to XFS sync , especially fsync
From: "Gopala Krishna" <gopalakrishna.n.m@xxxxxxxxx>
Date: Tue, 15 Jan 2008 19:14:12 +0530
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=OeBJfGKizAzrG0oHGgMrIMcO7PvwiuF4EuTH1JRjwJA=; b=p63cbDlDXsiZFYnML2dvY8whsl65CDk4l98AsQFOARi4fR/Y43LpX3uvlcCu9tpDkjd2JiTFsEQG/h2BBUB6ifbp793ddahCRrnaKtEFA52TfR1NdZDlnGyLiBJ6dJGtM2aHeiMhBGDoTYgrUxwaDd0x+PUeXjRPiHXMhXkkQWw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=ayhYamzaonH9lOy/AYpydlAl1K+YRYmd6EnNu5yTAjhshWDYeHWvu/91BVCNnhHAhdYTH8vdSoD/z/mHLg3jRs25+zxX1+eMhoAEmYYg5KtD/un5E6O8M/NRfBNH1QNTxVAozOgzHCieif2MpSpsAANdZrAAFNv0UCZeK5WckxA=
In-reply-to: <20080114224245.GT155259@xxxxxxx>
References: <d711080c0801140414n48e47140y88f545eba605eff9@xxxxxxxxxxxxxx> <20080114224245.GT155259@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
Hi All,
Thanks a lot for your response.
I never thought it might be in a log and not flushed to disk.
Very good clue.

>>>It is not XFS problem. It is your problem ;)
Good comment. Agreed : -).

>>How are you finding and inode off disk

I have lot of code getting in to that. To explain that I have to go through
that complex part of the code to explain in detail.

Basically once we get indoe number for a given file from the available
system call, we only depending upon the XFS layout and it's structure.  We
are  reading super block from a particular disk offset  and calculating
address for inode offset and its address on the disk and reading directly
from the disk offset. We are totally depending on XFS on disk layout.

 To get very much detail , step by step , I have to go through complete code
and lot of calculation involved in this process.  But it is going fine in
most of the cases except when new files are copied and all of you answered
for that.

Thanks alot for your respopnse.


On 1/15/08, David Chinner <dgc@xxxxxxx> wrote:
> On Mon, Jan 14, 2008 at 05:44:22PM +0530, Gopala Krishna wrote:
> > Hi,
> > I am seeing some strange problem with XFS and would like to know  the
> > expected behavior and if it is faulty is there any patches to resolve
> the
> > problem.
> >
> > Problem:
> > ======
> > Basically I am extracting metadata information for a given file by
> reading
> > the inode structure from the particular disk offset (based on
> it's  position
> > calculated by published inode structure and super block structure
> >  information). Before reading the metada data information from the disk,
> I
> > am calling fsync (I used to call sync, but later I changed to fsync,
> since
> > sync is not guranteed to flush all meta data)  to ensure all metadata
> > related to file is flushed to disk. Later I am reading particular disk
> > offset as per calculation.   I am getting XFS magic field properly after
> > mapping to XFs inode structure. However I am not getting dimode properly
> in
> > some cases (not all cases) and it shows 00000 even for regular file and
> > directory.
> How are you finding and reading the inode off disk?
> Cheers,
> Dave.
> --
> Dave Chinner
> Principal Engineer
> SGI Australian Software Group

[[HTML alternate version deleted]]

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