xfs
[Top] [All Lists]

Re: Questions about recovery

To: Eric Sandeen <sandeen@xxxxxxx>
Subject: Re: Questions about recovery
From: Steve Lord <lord@xxxxxxx>
Date: Thu, 17 May 2001 09:47:56 -0500
Cc: Lauri Ojantakanen <lauri@xxxxxxxxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: Message from Eric Sandeen <sandeen@sgi.com> of "Thu, 17 May 2001 08:49:17 CDT." <3B03D6DD.9E31A922@sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
> Lauri Ojantakanen wrote:
> > 
> > Hi,
> > 
> > I am very happy using xfs (converted everything to xfs:). Usually everythin
> g
> > goes fine with the system but there is one kinda scary thing: sometimes som
> e
> > files seem to be getting filled with null's after recovery. I mean that aft
> er
> > one recovery one opera's bookmark file was still there but the contents of
> > the file was just  '\0'. 
> 
> This has been discussed a few times on the list.  (See the "might have
> found a bug..." thread from this week).  The short answer is that it's a
> feature, and specifying synchronous writes at mount time will minimize
> it, but will also kill your performance.  You can also tune the bdflush
> daemon to flush writes more often - also reducing performance.  It's a
> tradeoff.
> 
> -Eric
> 

I should also add here that the difference between what happens with XFS in
this scenario and what would happen with ext2 is that with ext2 you probably
would not see the new file at all - or the old one, but it depends on what
got synced and what did not. The reason files show up with no data in xfs
is that the delayed allocation code which reserves space during a write call
has to bump the inode size - this size is making it out to disk, however,
the allocation of real extents and the flush of the data is not. If delayed
allocation was not being used you would get a file with garbage read off
the disk, since the disk space would be allocated during the write call,
but the data would still not be written out into it.

Having a journalled filesystem does not in general mean you go pulling
the plug without shutting the machine down, recovery is there for dealing
with accidents and crashes, not so you can use the power button to
shutdown ;-)

Steve



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