]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: allow setting and clearing of log incompat feature flags
authorDarrick J. Wong <djwong@kernel.org>
Sun, 8 Aug 2021 15:27:12 +0000 (08:27 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 9 Aug 2021 22:57:59 +0000 (15:57 -0700)
commita7de8c048ff2a12d5382407aea396b5b30381ebe
tree25fc6e2aaa54d7d2367e73d4dd362ac692734fa6
parent7046e18af16981db9763e99c4f7e8076557f18c8
xfs: allow setting and clearing of log incompat feature flags

Log incompat feature flags in the superblock exist for one purpose: to
protect the contents of a dirty log from replay on a kernel that isn't
prepared to handle those dirty contents.  This means that they can be
cleared if (a) we know the log is clean and (b) we know that there
aren't any other threads in the system that might be setting or relying
upon a log incompat flag.

Therefore, clear the log incompat flags when we've finished recovering
the log, when we're unmounting cleanly, remounting read-only, or
freezing; and provide a function so that subsequent patches can start
using this.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
fs/xfs/libxfs/xfs_format.h
fs/xfs/xfs_log.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h