[GIT PULL 3/8] xfs: fix ro mounting with unknown rocompat features

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi Chandan,

Please pull this branch with changes.

As usual, I did a test-merge with the main upstream branch as of a few
minutes ago, and didn't see any conflicts.  Please let me know if you
encounter any problems.


The following changes since commit ef7d9593390a050c50eba5fc02d2cb65a1104434:

xfs: remove CPU hotplug infrastructure (2023-09-11 08:39:04 -0700)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/fix-ro-mounts-6.6_2023-09-12

for you to fetch changes up to 74ad4693b6473950e971b3dc525b5ee7570e05d0:

xfs: fix log recovery when unknown rocompat bits are set (2023-09-12 10:31:07 -0700)

xfs: fix ro mounting with unknown rocompat features [v2]

Dave pointed out some failures in xfs/270 when he upgraded Debian
unstable and util-linux started using the new mount apis.  Upon further
inquiry I noticed that XFS is quite a hot mess when it encounters a
filesystem with unrecognized rocompat bits set in the superblock.

Whereas we used to allow readonly mounts under these conditions, a
change to the sb write verifier several years ago resulted in the
filesystem going down immediately because the post-mount log cleaning
writes the superblock, which trips the sb write verifier on the
unrecognized rocompat bit.  I made the observation that the ROCOMPAT
features RMAPBT and REFLINK both protect new log intent item types,
which means that we actually cannot support recovering the log if we
don't recognize all the rocompat bits.

Therefore -- fix inode inactivation to work when we're recovering the
log, disallow recovery when there's unrecognized rocompat bits, and
don't clean the log if doing so would trip the rocompat checks.

v2: change direction of series to allow log recovery on ro mounts

This has been lightly tested with fstests.  Enjoy!

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>

Darrick J. Wong (2):
xfs: allow inode inactivation during a ro mount log recovery
xfs: fix log recovery when unknown rocompat bits are set

fs/xfs/libxfs/xfs_sb.c |  3 ++-
fs/xfs/xfs_inode.c     | 14 ++++++++++----
fs/xfs/xfs_log.c       | 17 -----------------
3 files changed, 12 insertions(+), 22 deletions(-)

[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]

  Powered by Linux