What were you trying to do that didn't work?
xfs_quota commands are outputting spurious errors when working with project quotas
Please provide the package NVR for which bug is seen:
xfsprogs-5.14.2-1.el9.x86_64
How reproducible:
easy
Steps to reproduce
# mkdir /mnt/tmp{1,2} # truncate -s10g /var/tmp/fs1.img # truncate -s10g /var/tmp/fs2.img # mkfs.xfs /var/tmp/fs1.img >/dev/null # mkfs.xfs /var/tmp/fs2.img >/dev/null # mount /var/tmp/fs1.img /mnt/tmp1 -opquota # mount /var/tmp/fs2.img /mnt/tmp2 -opquota # mkdir /mnt/tmp{1,2}/test # echo -e '1000:/mnt/tmp1/test\n2000:/mnt/tmp2/test' >/etc/projects # echo -e 'tmp1_test:1000\ntmp2_test:2000' >/etc/projid
set the project quota flags:
# xfs_quota -x -c 'project -s tmp1_test' /mnt/tmp1 # xfs_quota -x -c 'project -s tmp2_test' /mnt/tmp2
(xfs_quota outputs errors for the directory not currently being operated on, for example:
# xfs_quota -x -c 'project -s tmp1_test' /mnt/tmp1 xfs_quota: cannot find mount point for path `/mnt/tmp2/test': Invalid argument
other commands also output errors in the same manner:
# xfs_quota -x -c 'limit -p bhard=5g tmp1_test' /mnt/tmp1 xfs_quota: cannot find mount point for path `/mnt/tmp2/test': Invalid argument
other than the errors, the commands appear to work correctly:
# xfs_quota -x -c report /mnt/tmp1 xfs_quota: cannot find mount point for path `/mnt/tmp2/test': Invalid argument Project quota on /mnt/tmp1 (/dev/loop0) Blocks Project ID Used Soft Hard Warn/Grace ---------- -------------------------------------------------- #0 0 0 0 00 [--------] tmp1_test 0 0 5242880 00 [--------]
Expected results
No unrelated errors output from xfs_quota
Actual results
project directories not being operated on output unnecessary errors:
# xfs_quota -x -c 'project -s tmp1_test' /mnt/tmp1 xfs_quota: cannot find mount point for path `/mnt/tmp2/test': Invalid argument