]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
xfs/270: Fix ro mount failure when nrext64 option is enabled
authorChandan Babu R <chandan.babu@oracle.com>
Sat, 11 Jun 2022 11:10:34 +0000 (16:40 +0530)
committerZorro Lang <zlang@kernel.org>
Sun, 12 Jun 2022 10:09:37 +0000 (18:09 +0800)
commit5bb78c56ef591936d4cf54b40cf56a43616e29f9
tree4af4b9991f8608fd8aadd49262d5a99b39e5796e
parent3493b8dc8b3de08470d09d71ca074f885d4c8b0b
xfs/270: Fix ro mount failure when nrext64 option is enabled

With nrext64 option enabled at run time, the read-only mount performed by the
test fails because,
1. mkfs.xfs would have calculated log size based on reflink being enabled.
2. Clearing the reflink ro compat bit causes log size calculations to yield a
   different value.
3. In the case where nrext64 is enabled, this causes attr reservation to be
   the largest among all the transaction reservations.
4. This ends up causing XFS to require a larger ondisk log size than that
   which is available.

This commit fixes the problem by setting features_ro_compat to the value
obtained by the bitwise-OR of features_ro_compat field with 2^31.

This commit includes changes suggested by Dave Chinner to replace bashisms
with invocations to inline awk scripts.

Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/270
tests/xfs/270.out