public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Helge Hafting <helge.hafting@hist.no>
To: L A Walsh <lkml@tlinx.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: XFS: how to NOT null files on fsck?
Date: Thu, 05 Aug 2004 10:16:02 +0200	[thread overview]
Message-ID: <4111ECC2.4040301@hist.no> (raw)
In-Reply-To: <410FDA19.9020805@tlinx.org>

L A Walsh wrote:

>
>> The problem relates to an updated inode size
>> being flushed ahead of the data behind it (hence a size update
>> can make it out before delayed allocate extents do, and we end
>> up with a hole beyond the end of file, which reads as zeroes).
>>
> I believe I understand the scenario you are talking about, but I don't
> think it fits the examples I have referred to.  In particular, 
> "/etc/fstab".
> I update 'fstab' on Tuesday, say, it works fine...gets backed up just
> fine...and I forget about it and move on.  Then, 2-3 days later, my
> system crashes and doesn't want to some up.  That's odd, usually after
> a crash, it just burps a bit and comes back up.  I grumble and go for
> single user.  Turns out my 1.2k fstab file is all "nulls".  
> Coinidentally,
> I find, _maybe_, a couple of other files written around the same time,
> also nulled, including times when the nulls appeared in the system log
> for that time period!
> Now I know it takes a while before data may end up on disk and that it
> may not go out to disk in an ordered fashion, but 2-3 days?  

Seems strange to me, but the amount of delay is entirely up to the 
filesystem.

> This isn't
> a case of a multi-extent file.  My current fstab is only 1335 bytes long.
> I doubt it has ever been more than 2. 
> My filesystems all use the Allocation unit (AU) size allowed.  I wish
> for something larger than a 4k AU size but I'm told it is limited by
> the linux page size and to find a PC that uses the IA64 page size to
> use larger file AU size (but I haven't seen to many of these IA64 
> machines
> available from Dell or Gateway...:-)  Maybe the code in FAT32 that 
> handles
> larger AU's could be ported to XFS?  If FAT32 can do it...nevermind...
> I'm sure there are more important issues on the plate.
>
>>> Apparently not easily reproduced, no one has a clue why it does it.  
>>> Just does.
>>
>> No, its actually well known why it behaves this way.
>> We are looking into ways to address this, and have some
>> ideas - the trick is fixing it without hurting write
>> performance - which we will do, its just not trivial.
>>
> You could increase the max AU size :-)  But more seriously, is my
> example of writing a 1 AU sized file that becomes zeroed days later
> an example of the problem you are speaking of?
>
>> There are several techiques to reduce the impact of this
>> behaviour, as others have described (or see the linux-xfs
>> archives).
>>
> Like setting the disk for synchronous writes?  Why not something
> in between, like guaranteeing the info on a mostly quiescent machine
> will be written to disk within an hour or so?  Or is that not "it"?
>
This should be trivial.  Edit your crontab, so that cron will
run "sync" once per hour.  Everything queued for writing when the
"sync" command is issued will be on disk when the command finishes.
So this guarantees that nothing waits more than 1 hour. (Sync is usually
over in a few seconds on a home machine.  There should be no more
lost "old" files unless the fs has a bug.)

You may also want to run "sync" manually before doing something that
risks crashing. (Such as moving a live machine, dubious hotplugging,
testing beta device drivers . . .)

> I haven't seen an incidence of this behavior in several months on
> my machines so my particular problem may have been fixed and the
> problem you speak of is unrelated to my own, but the number of 
> unplanned shutdowns on my system has only increased recently, since I 
> upgraded
> to the stable 2.6 series, whereas before, with 2.4, it could be months
> between "blue screens".

You may want to keep using 2.4 for a while then - it probably _is_ a lot 
more stable.
It has been stabilizing for the entire 2.5 development time,
2.6 stabilization has just begun!

>
> Sad was the day that it was decided that the linux-kernel "corp" decided
> on feature development vs. stability in the "stable" kernel series. 
> Isn't that criticism lodged most often against MS. 

Not a big problem in this case.  If XFS isn't stable enough for you, 
consider one
of the many other filesystems.  ext3 or reiserfs for journalling, or 
plain old
ext2.  The nice thing about having many features, is that you have a set
to choose from.

Helge Hafting

  parent reply	other threads:[~2004-08-05  8:12 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
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 [this message]
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=4111ECC2.4040301@hist.no \
    --to=helge.hafting@hist.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@tlinx.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox