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: Olaf Frączyk <olaf@xxxxxxxxxxxxx>
Date: Mon, 14 Jan 2008 15:32:32 +0100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <d711080c0801140414n48e47140y88f545eba605eff9@xxxxxxxxxxxxxx>
References: <d711080c0801140414n48e47140y88f545eba605eff9@xxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
On Mon, 2008-01-14 at 17:44 +0530, Gopala Krishna wrote:
> So I am suspecting, even after calling fsync (which says it would block
> untill it flushes metadata information to disk ), is not really flushing. So
> only during unmount, it flushes metadata and hence I could get dimode
> properly. since after remounting , by reading metadata information , I could
> get mode properly and differentiate directory or regular file, and also it
> is filling magic etc. properly, I feel the data I am reading is right and
> that I could compare with stat system call and ls commands.
The metadata are put in log. So they are on disk. Just not in the place
you expect them to find.
> 
> If I am doing something wrong and no problem with XFS, then I should not get
> mode field properly even after unmount/remount operation.
At remount the log is replayed and the metadata are in the place where
you expect them to be.
> 
> Is there any problem with XFS fsync? Why dimode is getting updated only
> during unmount? why not when I call fsync? Because fsync says it has to
> flush all meta dat to disk before existing.
And it does.
It is not XFS problem. It is your problem ;)

BTW, the GRUB does similiar thing. And many people reported problems
about it.

Regards,

Olaf




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