xfs: convert remaining mount flags to state flags
authorDave Chinner <dchinner@redhat.com>
Thu, 19 Aug 2021 01:46:52 +0000 (18:46 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 19 Aug 2021 17:07:13 +0000 (10:07 -0700)
commit2e973b2cd4cdb993be94cca4c33f532f1ed05316
treeb44d08a1f5af0ef6be12f8b178975de8ac5bef92
parent0560f31a09e523090d1ab2bfe21c69d028c2bdf2
xfs: convert remaining mount flags to state flags

The remaining mount flags kept in m_flags are actually runtime state
flags. These change dynamically, so they really should be updated
atomically so we don't potentially lose an update due to racing
modifications.

Convert these remaining flags to be stored in m_opstate and use
atomic bitops to set and clear the flags. This also adds a couple of
simple wrappers for common state checks - read only and shutdown.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
18 files changed:
fs/xfs/libxfs/xfs_alloc.c
fs/xfs/libxfs/xfs_sb.c
fs/xfs/scrub/common.c
fs/xfs/scrub/scrub.c
fs/xfs/xfs_buf.c
fs/xfs/xfs_export.c
fs/xfs/xfs_filestream.c
fs/xfs/xfs_fsops.c
fs/xfs/xfs_icache.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_iops.c
fs/xfs/xfs_log.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_super.c
fs/xfs/xfs_trace.h