xfs
[Top] [All Lists]

Re: data corruption after unclean shutdown, sync does not work.

To: utz lehmann <xfs@xxxxxxxxxx>
Subject: Re: data corruption after unclean shutdown, sync does not work.
From: Steve Lord <lord@xxxxxxx>
Date: Sun, 11 Feb 2001 10:55:48 -0600
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: Message from utz lehmann <xfs@s2y4n2c.de> of "Sun, 11 Feb 2001 16:36:10 +0100." <20010211163610.A21525@s2y4n2c.de>
Sender: owner-linux-xfs@xxxxxxxxxxx

We have been making changes in how delayed allocation data is flushed out
to disk, we know it is not totally correct at the moment, looks like this
is more true than I realized.

As an experiment try this change, in linvfs_write_super() in 
fs/xfs/linux/xfs_super.c change

VFS_SYNC(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_NOWAIT|SYNC_ATTR,

to

VFS_SYNC(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_WAIT|SYNC_ATTR,

This may fix your problem, but may change the characteristics of the system
in undesirable ways since write_super is getting called every few seconds and
this will make it more synchronous.

If this does not help then the sync activity is not finding everything and
things are seriously broken.

Steve


> hi
> 
> i found a bug with the newer development kernels.
> 
> i have files with data corruption after hitting the reset button.
> it seems that "sync" does not sync the data to disk.
> 
> i made following test:
> 
> 
> cp -av /usr/src/linux/drivers/ drivers
> diff -r -u /usr/src/linux/drivers/ drivers/  (no differs)
> sync
> sync
> sync
> 
> hit the reset button.
> 
> after that, the diff reports about 190 (of 3134) files are different.
> 
> the files have the right size, but they are only filled with null chars.
> xfs_bmap reports, that they have no extends.
> 
> i have made the test with some older kernels:
> 
> the last working kernel is from feb, 4th 14:00 CET.
> the first buggy kernel is from feb, 6th 0:50 CET.
> 
> the tests were made on a xfs root partition (ide drive, no kio).
> 
> and i notice that on the buggy kernels, when the (root) fs is marked
> readonly while shutdown, there were more diskactivity than on the good ones.
> the data is only written to disk while marking readonly?
> 
> 
> hope that helps.
> 
> 
> utz



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