From: Chris Wedgwood <cw@f00f.org>
To: L A Walsh <lkml@tlinx.org>
Cc: Norberto Bensa <norberto+linux-kernel@bensa.ath.cx>,
Jan Knutar <jk-lkml@sci.fi>,
linux-kernel@vger.kernel.org
Subject: Re: XFS: how to NOT null files on fsck?
Date: Mon, 12 Jul 2004 15:53:38 -0700 [thread overview]
Message-ID: <20040712225338.GD23623@taniwha.stupidest.org> (raw)
In-Reply-To: <40F31348.70807@tlinx.org>
On Mon, Jul 12, 2004 at 03:40:08PM -0700, L A Walsh wrote:
> If it is of any help (I doubt it, it perplexes me)...the files I've
> written out with vim and have returned "nulls" have been files that
> were written out 2-3 _DAYS_ earlier -- often with more recent write
> having been saved fine.
I've heard this before and you're not the only person to claim this.
For a period of time the buffer-flushing code was broken and this was
probably possible then, even sync/fsync failed to write stuff out.
But that was a long time ago (last year) and I'm not sure that is
still the case. It could be, the flushing code is quite complicated
and I don't understand it fully, but testing seems to indicate it does
work.
To be quite honest I've never seen nulls in files that a days old, and
I have scripts which checksum (md5) my files (hundreds of gigabytes)
which would notice this, so knowing how to reproduce it would be nice.
> I've also seen sections in log files where blocks would return zero
> in the middle of a log.
Log was being appended, system crashed, you get nulls at the end when
rebootd, the logger opens the file append and starts writing stuff,
the nulls end up in the middle. Arguably this is expected.
> Obviously blocks before and after successfully made it to disk, but
> in _RARE_ circumstances (crashes and unplanned shutdowns are already
> rare enough, so it's a rare bug that only shows up on a 'rare'
> occasion... :-)
It can't be blocks before and after, if that was the case you wouldn't
see the nulls. I'm pretty sure for you the nulls are not really
on-disk, looking at the raw device you won't see them. They nulls are
returns for unwritten extents just as nulls are returned for holes in
sparse files.
> Almost (shot in the dark), like some code that was supposed to zero
> unused but allocated datablocks got pointed at the wrong blocks,
> since these files are readable as having been written (yes may all
> be out of membuffs) and are often recoverable from the day's backup.
I cant see how. It seems to me that if block pointers got all messed
up, xfs_repair would scream bloody murder and this explode and die on
a live fs. I don't see reports that look like this.
> If it was a file I just edited and then it crashed, that I could
> understand more than having files I haven't touched for a few days
> be zapped.
My gut feeling is these files really are being changed. Stat should
show if this is the case.
--cw
next prev parent reply other threads:[~2004-07-12 22:54 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-05 5:47 XFS: how to NOT null files on fsck? Norberto Bensa
2004-07-09 16:37 ` L A Walsh
2004-07-09 21:59 ` Chris Wedgwood
2004-07-10 18:33 ` L A Walsh
2004-07-10 18:43 ` Chris Wedgwood
2004-07-10 21:24 ` Bernd Eckenfels
2004-07-11 21:54 ` Helge Hafting
2004-07-12 17:56 ` H. Peter Anvin
2004-07-12 19:59 ` Chris Wedgwood
2004-07-12 20:32 ` H. Peter Anvin
2004-07-12 22:29 ` Bernd Eckenfels
2004-07-12 23:03 ` Bernd Eckenfels
2004-07-12 23:14 ` Chris Wedgwood
2004-07-10 18:43 ` Jan Knutar
2004-07-10 18:46 ` Chris Wedgwood
2004-07-10 18:55 ` Norberto Bensa
2004-07-10 19:19 ` Chris Wedgwood
2004-07-12 21:20 ` Chris Wedgwood
2004-07-12 22:40 ` L A Walsh
2004-07-12 22:53 ` Chris Wedgwood [this message]
2004-07-13 1:44 ` Bernd Eckenfels
2004-07-13 5:24 ` Chris Wedgwood
[not found] ` <2hgxc-5x9-9@gated-at.bofh.it>
2004-07-13 7:25 ` Anton Ertl
2004-07-13 8:09 ` Chris Wedgwood
2004-07-13 9:34 ` Anton Ertl
2004-07-13 9:53 ` Chris Wedgwood
2004-07-13 10:27 ` Tim Connors
2004-07-13 10:38 ` ismail dönmez
2004-07-13 11:16 ` Nick Piggin
2004-07-13 12:52 ` ismail dönmez
2004-07-13 10:58 ` Chris Wedgwood
2004-07-13 13:33 ` Anton Ertl
2004-07-13 20:32 ` Chris Wedgwood
2004-07-13 22:42 ` Bernd Eckenfels
2004-07-14 18:49 ` Anton Ertl
2004-07-14 19:00 ` Chris Wedgwood
2004-07-13 22:24 ` Helge Hafting
2004-07-13 22:39 ` Chris Wedgwood
2004-07-13 23:23 ` Bernd Eckenfels
2004-07-14 18:53 ` Anton Ertl
2004-07-10 19:33 ` Andreas Schwab
2004-07-10 19:40 ` Chris Wedgwood
2004-07-10 19:46 ` Norberto Bensa
2004-07-10 20:03 ` Chris Wedgwood
2004-07-11 1:21 ` Gopikrishnan Sidhardhan
2004-07-29 1:30 ` Nathan Scott
2004-08-03 18:31 ` L A Walsh
2004-08-04 0:48 ` Andi Kleen
2004-08-04 6:37 ` L A Walsh
2004-08-05 8:16 ` Helge Hafting
2004-08-06 1:10 ` Nathan Scott
2004-08-06 1:34 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040712225338.GD23623@taniwha.stupidest.org \
--to=cw@f00f.org \
--cc=jk-lkml@sci.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@tlinx.org \
--cc=norberto+linux-kernel@bensa.ath.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.