xfs
[Top] [All Lists]

Re: [PATCH] log replay should not overwrite newer ondisk inodes

To: Lachlan McIlroy <lachlan@xxxxxxx>
Subject: Re: [PATCH] log replay should not overwrite newer ondisk inodes
From: David Chinner <dgc@xxxxxxx>
Date: Wed, 5 Sep 2007 16:54:07 +1000
Cc: Timothy Shimmin <tes@xxxxxxx>, Shailendra Tripathi <stripathi@xxxxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <46DE0906.2040602@xxxxxxx>
References: <46D6279F.40601@xxxxxxx> <46DDE4A2.1070204@xxxxxxxxx> <46DE042D.8060103@xxxxxxx> <46DE0906.2040602@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Wed, Sep 05, 2007 at 11:40:22AM +1000, Lachlan McIlroy wrote:
> >Dave answered this but yes this is a case where we are breaking
> >the transaction model IMO. And my understanding is that we are doing
> >this for performance reasons.
> >One of Lachlan's proposals (IIRC) was to log the size change before the
> >ondisk size change in xfs_aops.c/xfs_setfilesize()
> >and thus follow the model but questions were raised about introducing
> >performance overhead of log traffic in the write path.
> 
> It would make life easier to do it that way - we wouldn't have to check
> the flushiter field of the ondisk inode because we know we will end up
> with the same thing by just replaying the log.  But since the addition
> of the flushiter stuff pre-dates the NULL files changes there must be
> another reason we need it.  Previously the size change would get logged
> with an extent allocation transaction but extending a file within the
> same last block would not send the new file size to the log.  I think
> that may have been the reason for needing the flushiter stuff.  If we
> log the file size change in xfs_setfilesize() we may not need the
> flushiter stuff at all, hmmm maybe for timestamp updates?

atime, size updates and inode version format conversion may be written without
a transaction first logging the change.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


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