xfs
[Top] [All Lists]

Re: synchronization of XFS

To: Chris Wedgwood <cw@xxxxxxxx>
Subject: Re: synchronization of XFS
From: Steve Lord <lord@xxxxxxx>
Date: Thu, 25 Mar 2004 07:41:46 -0600
Cc: Stefan Smietanowski <stesmi@xxxxxxxxxx>, "IKARASHI, Seiichi" <ikarashi@xxxxxxxxxxxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: <20040325132200.GA12333@dingdong.cryptoapps.com>
References: <4060F7FC.8090602@miraclelinux.com> <20040325063902.GA9697@dingdong.cryptoapps.com> <4062C97A.6030702@miraclelinux.com> <20040325124152.GA12078@dingdong.cryptoapps.com> <4062D7E5.6070501@stesmi.com> <20040325132200.GA12333@dingdong.cryptoapps.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)
Chris Wedgwood wrote:
> On Thu, Mar 25, 2004 at 02:00:21PM +0100, Stefan Smietanowski wrote:
> 
> 
>>Grub does it as a workaround.
> 
> 
> It's stupid.  How does sync() multiple times in secession work better
> than once?
> 
> 
>>Happens with current tree I can tell you that me and .. Steve I
>>think discussed it on IRC a while back and he looked into the POSIX
>>spec and according to POSIX a filesystem does not have to keep the
>>block device the same as the filesystem after a sync() (or mounting
>>SYNC).
> 
> 
> Well, not to split hair, sync() means all data needs to hit the disk.
> Accessing it via a bock device for a mounted filesystem will cause bad
> stuff --- is this what grub does?
> 

sync means the filesystem will look the same after a crash, it does
not mean all the data has to hit the disk. In the case of XFS it
does not really mean this. Sync will make sure that the journal
is upto date on disk, so the metadata can be recovered after a
crash. Making sync push all the metadata itself would slow it
down.

Now if grub is opening the block device and reading out of that,
it is looking at the same pages for metadata that xfs is looking
at in memory. There is a bug where you can get corruption if you
access the block device in parallel with the filesystem. Possibly
this is behind the problem.

Christoph has been looking into fixing this.

Does grub just read from the block device, or does it do writes
too? Writes directly in via the block device could really confuse
things.

Steve



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