[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F2C9B30.1030902@sandeen.net>
Date: Fri, 03 Feb 2012 20:42:56 -0600
From: Eric Sandeen <sandeen@...deen.net>
To: Jan Kara <jack@...e.cz>
CC: linux-fsdevel@...r.kernel.org, Dave Chinner <dchinner@...hat.com>,
Surbhi Palande <csurbhi@...il.com>,
Kamal Mostafa <kamal@...onical.com>,
Christoph Hellwig <hch@...radead.org>,
LKML <linux-kernel@...r.kernel.org>, xfs@....sgi.com,
linux-ext4@...r.kernel.org
Subject: Re: [PATCH 6/8] xfs: Use generic writers counter instead of m_active_trans
counter
On 1/20/12 2:34 PM, Jan Kara wrote:
> m_active_trans counter is racy wrt filesystem freezing. The patch replaces it
> with generic counter of running transactions which is properly synchronized
> with filesystem freezing. Things are a bit more complex because we need to log
> a dummy transaction and free block counters after the filesystem is frozen so
> we need to pass information to _xfs_trans_alloc() whether the transaction is
> part of filesystem freezing or not.
>
> Signed-off-by: Jan Kara <jack@...e.cz>
> ---
...
> xfs_trans_t *
> _xfs_trans_alloc(
> xfs_mount_t *mp,
> uint type,
> - uint memflags)
> + uint memflags,
> + bool freezing)
> {
> xfs_trans_t *tp;
>
> - atomic_inc(&mp->m_active_trans);
> -
> + if (!freezing)
> + sb_start_write(mp->m_super, SB_FREEZE_TRANS);
> + else
> + WARN_ON(xfs_test_for_freeze(mp) != SB_FREEZE_TRANS);
Hm this could be an issue because for both the umount path and the
freeze / xfs_quiesce_attr path, we call xfs_log_sbcount which sends
"true" for freezing and we'll trip up here because we won't be
in SB_FREEZE_TRANS during umount.
I think we have to push the flag all the way up to xfs_log_sbcount
callers?
-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists