xfs
[Top] [All Lists]

Re: [PATCH 11/27] xfs: fix filesystsem freeze race in xfs_trans_alloc

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 11/27] xfs: fix filesystsem freeze race in xfs_trans_alloc
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 30 Jun 2011 12:59:18 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110629140338.719775353@xxxxxxxxxxxxxxxxxxxxxx>
References: <20110629140109.003209430@xxxxxxxxxxxxxxxxxxxxxx> <20110629140338.719775353@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Wed, Jun 29, 2011 at 10:01:20AM -0400, Christoph Hellwig wrote:
> As pointed out by Jan xfs_trans_alloc can race with a concurrent filesystem
> free when it sleeps during the memory allocation.  Fix this by moving the
  freeze

> wait_for_freeze call after the memory allocation.  This means moving the
> freeze into the low-level _xfs_trans_alloc helper, which thus grows a new
> argument.  Also fix up some comments in that area while at it.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Reviewed-by: Dave Chinner <david@xxxxxxxxxxxxx>

>  /*
> - * xfs_log_sbcount
> - *
>   * Called either periodically to keep the on disk superblock values
>   * roughly up to date or from unmount to make sure the values are
>   * correct on a clean unmount.
> - *
> - * Note this code can be called during the process of freezing, so
> - * we may need to use the transaction allocator which does not not
> - * block when the transaction subsystem is in its frozen state.
>   */

I't s not called periodically any more from xfssyncd. Hmmm, that was
removed because it was preventing the filesystem from idling, but we
really should be doing this every so often when the filesystem is
dirty. I'll have a think about that....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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