xfs
[Top] [All Lists]

Re: Null files reloaded :-)

To: linux-xfs@xxxxxxxxxxx
Subject: Re: Null files reloaded :-)
From: Ricardo Correia <wizeman@xxxxxxxx>
Date: Tue, 20 Jul 2004 14:40:03 +0100
Cc: Chris Wedgwood <cw@xxxxxxxx>
In-reply-to: <20040720060934.GA8839@xxxxxxxxxxxxxxxxxxxxx>
References: <200407200444.21761.wizeman@xxxxxxxx> <20040720060934.GA8839@xxxxxxxxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: KMail/1.6.2
On Tuesday 20 July 2004 07:09, Chris Wedgwood wrote:
> sounds like:
>
>   old file foo                                        on disk, all safe
>
>   new file bar is written                     metadata on disk, file
>                                               data in ram
>
>   [*]
>
>   rename bar to foo                           old file unlinked, new
>                                               file in place but data
>                                               not flushed yet
>
> now, if there was an fsync at [*] it would work just fine
>

What if during journal replaying it would recognize this behaviour, and use 
the old file, which is still on-disk (right? I suppose at this point the 
metadata only gets written to the journal, unless there's a sync, of course)?

> > So why does this happen? Is it for security reasons? I don't think
> > it's that..
>
> it is
>

Here I meant that XFS wouldn't recover the file data if it wasn't sure that 
it's contents were valid, which would be useful in multi-user systems (where 
a user could accidentaly see other users' files), but in single-user systems 
it doesn't matter. But I guess this isn't the problem.


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