mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs/007: use gquotino for project quotas on pre-v5 superblocks
This test checks block usage on quota inodes based on the inode number values stored in the superblock. Version 5 superblocks (crc=1) have an independent project quota inode field to support concurrent group and project quotas. Older superblocks do not have the pquotino field. The gquotino field is reused for project quotas. The test currently unconditionally uses the pquotino field to determine the project quota inode. This causes failures on pre-v5 superblocks as the test queries the block usage of an incorrect inode number. Update the test to use gquotino as the project quota inode on such filesystems. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
262442515c
commit
50ea2c6606
+9
-3
@@ -50,7 +50,8 @@ _require_xfs_quota
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_scratch_mkfs_xfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
|
||||
. $tmp.mkfs
|
||||
|
||||
do_test()
|
||||
{
|
||||
@@ -88,11 +89,16 @@ _qmount_option "uquota,gquota"
|
||||
_qmount
|
||||
do_test uquotino gquotino ug
|
||||
|
||||
# Test user and project
|
||||
# Test user and project. Note that pquotino only exists on v5 (crc=1)
|
||||
# superblocks. Older supers reuse gquotino.
|
||||
PQUOTINO=pquotino
|
||||
if [ $_fs_has_crcs == 0 ]; then
|
||||
PQUOTINO=gquotino
|
||||
fi
|
||||
_qmount_option "uquota,pquota"
|
||||
_qmount
|
||||
_require_prjquota $SCRATCH_DEV
|
||||
do_test uquotino pquotino up
|
||||
do_test uquotino $PQUOTINO up
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
|
||||
Reference in New Issue
Block a user