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

Dave Chinner
2011-06-30T02:59:23Z

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@lst.de>

Reviewed-by: Dave Chinner <david@fromorbit.com>

> /*
> - * 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@fromorbit.com