xfs/007: fix regressions on V4 filesystems
Following commit
eae40404, I noticed the following regression when
running a V4 fstests run on an 5.13 kernel:
--- /tmp/fstests/tests/xfs/007.out 2021-05-13 11:47:55.
793859995 -0700
+++ /var/tmp/fstests/xfs/007.out.bad 2021-07-28 09:23:42.
856000000 -0700
@@ -16,4 +16,4 @@
*** umount
*** Usage after quotarm ***
core.nblocks = 0
-core.nblocks = 0
+core.nblocks = 1
The underlying cause of this problem is the fact that we now remount the
filesystem with no quota options because that will (soon) become the
only means to turn off quota accounting on XFS. Because V4 filesystems
don't support simultaneous project and group quotas and play weird
remapping games with the incore superblock field, we actually have to
issue a remove command for the group quota file if we're trying to
truncate the project quota file on a V4 filesystem.
Due to stupid limitations in xfs_quota we actually have to issue a
separate 'remove' command.
Fixes: eae40404 ("xfs/007: unmount after disabling quota")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>