public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET v2 0/2] fstests: fix ro mounting with unknown rocompat features
@ 2023-08-29 23:09 Darrick J. Wong
  2023-08-29 23:09 ` [PATCH 1/2] xfs/270: actually test file readability Darrick J. Wong
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Darrick J. Wong @ 2023-08-29 23:09 UTC (permalink / raw)
  To: zlang, djwong; +Cc: Dave Chinner, linux-xfs, fstests, guan, david, sandeen

Hi all,

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

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=fix-ro-mounts
---
 tests/xfs/270     |   80 ++++++++++++++++++++++++++++++++++++++---------------
 tests/xfs/270.out |    2 +
 2 files changed, 59 insertions(+), 23 deletions(-)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-09-19  3:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-29 23:09 [PATCHSET v2 0/2] fstests: fix ro mounting with unknown rocompat features Darrick J. Wong
2023-08-29 23:09 ` [PATCH 1/2] xfs/270: actually test file readability Darrick J. Wong
2023-09-13 16:54   ` Zorro Lang
2023-08-29 23:09 ` [PATCH 2/2] xfs/270: actually test log recovery with unknown rocompat features Darrick J. Wong
2023-09-17 16:44 ` [PATCHSET v2 0/2] fstests: fix ro mounting " Zorro Lang
2023-09-18 15:17   ` Darrick J. Wong
2023-09-18 16:44     ` Zorro Lang
2023-09-18 18:35       ` Darrick J. Wong
2023-09-19  2:57         ` Zorro Lang
2023-09-19  3:06           ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox