]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: convert log flags to an operational state field
authorDave Chinner <dchinner@redhat.com>
Wed, 11 Aug 2021 00:59:02 +0000 (17:59 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 16 Aug 2021 19:09:28 +0000 (12:09 -0700)
commit9c6fc375be0403fa6dae7222489892ff627bafa8
tree6cc1a1d760374d1fefbf0c9d37b320558acae63b
parent886e532650fdff085abb92e2b0e6d1489e2f9ec8
xfs: convert log flags to an operational state field

log->l_flags doesn't actually contain "flags" as such, it contains
operational state information that can change at runtime. For the
shutdown state, this at least should be an atomic bit because
it is read without holding locks in many places and so using atomic
bitops for the state field modifications makes sense.

This allows us to use things like test_and_set_bit() on state
changes (e.g. setting XLOG_TAIL_WARN) to avoid races in setting the
state when we aren't holding locks.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_log.c
fs/xfs/xfs_log.h
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_super.c