[Top] [All Lists]

Re: sparse file handling bug in XFS

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: sparse file handling bug in XFS
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 20 Jun 2011 08:27:23 +1000
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Trammell Hudson <Trammell.Hudson@xxxxxxxxxxxx>, Sean Noonan <Sean.Noonan@xxxxxxxxxxxx>, Martin Bligh <Martin.Bligh@xxxxxxxxxxxx>, Ian Baum <Ian.Baum@xxxxxxxxxxxx>, Stephen Degler <Stephen.Degler@xxxxxxxxxxxx>, "'linux-xfs@xxxxxxxxxxx'" <linux-xfs@xxxxxxxxxxx>
In-reply-to: <4DFA70B7.5080206@xxxxxxxxxxx>
References: <081DDE43F61F3D43929A181B477DCA95639B561F@xxxxxxxxxxxxxxxxxxxx> <4DFA2A76.6000104@xxxxxxxxxxx> <4DFA3E7D.4030408@xxxxxxxxxxx> <20110616175743.GA20570@xxxxxxxxxxxxx> <4DFA70B7.5080206@xxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Thu, Jun 16, 2011 at 04:08:07PM -0500, Eric Sandeen wrote:
> On 6/16/11 12:57 PM, Christoph Hellwig wrote:
> > On Thu, Jun 16, 2011 at 12:33:49PM -0500, Eric Sandeen wrote:
> >> Actually this looks like it's a result of
> >>
> >> 6e857567dbbfe14dd6cc3f7414671b047b1ff5c7 xfs: don't truncate prealloc from 
> >> frequently accessed inodes
> >>
> >> I thought Dave's patch from the "Re: drastic changes to allocsize 
> >> semantics in or around 2.6.38?"
> >> thread would fix it, but it doesn't seem to.  Here it is anyway ;)
> > 
> > It should fix the thing about the preallocation staying when removing
> > and recreating the file.  Keeping pre-allocate blocks around otherwise
> > is a considered a feature.
> It strikes me as odd that truncating & rewriting would lead to
> different preallocation though .. I'll let Dave chime in.

Yeah, it's an oversight - we should reset the XFS_IDIRTY_RELEASE
flag when we set the XFS_ITRUNCATED flag. We remove the
preallocation beyond EOF when we truncate, so we should also trash
the state that tries to preserve it at the same time....


Dave Chinner

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