]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_quota: fix missing mount point warning
authorPavel Reichl <preichl@redhat.com>
Wed, 11 Oct 2023 20:50:54 +0000 (22:50 +0200)
committerCarlos Maiolino <cem@kernel.org>
Tue, 21 Nov 2023 13:09:36 +0000 (14:09 +0100)
commit9448c82ef57cfba5505e1f2312528fd6224cf291
treeaf99a41666fccb8e59358d9f1d5042ab325611c3
parent2c7fe3b33bca6987437b5aa4f4d30ae5198f9bfd
xfs_quota: fix missing mount point warning

When user have mounted an XFS volume, and defined project in
/etc/projects file that points to a directory on a different volume,
then:
`xfs_quota -xc "report -a" $path_to_mounted_volume'

complains with:
"xfs_quota: cannot find mount point for path \
`directory_from_projects': Invalid argument"

unlike `xfs_quota -xc "report -a"' which works as expected and no
warning is printed.

This is happening because in the 1st call we pass to xfs_quota command
the $path_to_mounted_volume argument which says to xfs_quota not to
look for all mounted volumes on the system, but use only those passed
to the command and ignore all others (This behavior is intended as an
optimization for systems with huge number of mounted volumes). After
that, while projects are initialized, the project's directories on
other volumes are obviously not in searched subset of volumes and
warning is printed.

I propose to fix this behavior by conditioning the printing of warning
only if all mounted volumes are searched.

Signed-off-by: Pavel Reichl <preichl@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
libfrog/paths.c