xfs
[Top] [All Lists]

Re: [PATCH 1/3] xfs: reset inode per-lifetime state when recycling it

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/3] xfs: reset inode per-lifetime state when recycling it
From: Alex Elder <aelder@xxxxxxx>
Date: Thu, 23 Jun 2011 16:58:05 -0500
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <1308792901-22880-2-git-send-email-david@xxxxxxxxxxxxx>
References: <1308792901-22880-1-git-send-email-david@xxxxxxxxxxxxx> <1308792901-22880-2-git-send-email-david@xxxxxxxxxxxxx>
Reply-to: <aelder@xxxxxxx>
On Thu, 2011-06-23 at 11:34 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> XFS inodes has several per-lifetime state fields that determine the
> behaviour of the inode. These state fields are not all reset when an
> inode is reused from the reclaimable state.
> 
> This can lead to unexpected behaviour of the new inode such as
> speculative preallocation not being truncated away in the expected
> manner for local files until the inode is subsequently truncated,
> freed or cycles out of the cache. It can also lead to an inode being
> considered to be a filestream inode or having been truncated when
> that is not the case.
> 
> Rework the reinitialisation of the inode when it is recycled to
> ensure that it is pristine before it is reused. While there, also
> fix the resetting of state flags in the recycling error paths so the
> inode does not become unreclaimable.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>

Looks good to me.

Reviewed-by: Alex Elder <aelder@xxxxxxx>

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