xfsprogs/xfsprogs-rhelonly-xfs_quota-fix-missing-mount-point-warning.patch
Pavel Reichl c49945ae5f Rebase to upstream version 6.3.0
-
Following is a list of dropped backported patches which
are contained in the current rebase:
xfsprogs-5.19.0-xfs-hoist-refcount-record-merge-predicates.patch (v6.2.0)
xfsprogs-5.19.0-xfs_db-fix-dir3-block-magic-check.patch (v6.1.0)
xfsprogs-5.19.0-xfs-estimate-post-merge-refcounts-correctly.patch (v6.2.0)
xfsprogs-5.19.0-xfs-get-rid-of-assert-from-xfs_btree_islastblock.patch (v6.2.0)
xfsprogs-5.19.0-xfs-fix-off-by-one-error-in-xfs_btree_space_to_heigh.patch (v6.2.0)
xfsprogs-5.19.0-xfs-fix-sb-write-verify-for-lazysbcount.patch (v6.1.0)
xfsprogs-5.19.0-xfs-removed-useless-condition-in-function-xfs_attr_n.patch (v6.0.0)
xfsprogs-5.19.0-xfs_repair-retain-superblock-buffer-to-avoid-write-h.patch (v6.1.0)
-
Rename the remaining patches so the name contains upstream version in which
they are implemented, or "rhelonly".
-
Drop Eric Sandeen's public key used to check tarball signature and replace it by
Carlos Maiolino's (current upstream xfsprogs maintainer).
-
Following is a list of newly backported patches from versions released after 6.3
which are fixing patches present in version 6.3:
xfsprogs-6.4.0-xfs_repair-don-t-add-junked-entries-to-the-rebuilt-d.patch
xfsprogs-6.4.0-xfs_repair-don-t-spray-correcting-imap-all-by-itself.patch
xfsprogs-6.4.0-xfs_repair-fix-messaging-when-fixing-imap-due-to-spa.patch
xfsprogs-6.4.0-xfs_repair-fix-messaging-when-shortform_dir2_junk-is.patch
-
Backport:
xfsprogs-6.4.0-xfs_db-move-obfuscate_name-assertion-to-callers.patch
xfsprogs-6.4.0-xfs_db-fix-metadump-name-obfuscation-for-ascii-ci-fi.patch
xfsprogs-6.4.0-xfs-stabilize-the-dirent-name-transformation-functio.patch
to implement RHEL-RHEL-8284
-
Backport xfsprogs-rhelonly-xfs_quota-fix-missing-mount-point-warning.patch
to implement RHEL-7900
-
Resolves: RHEL-15399
Resolves: RHEL-8284
Resolves: RHEL-7900

Signed-off-by: Pavel Reichl <preichl@redhat.com>
2023-11-14 22:44:52 +01:00

92 lines
2.9 KiB
Diff

From ea73527ddb9c9525e696efe0b0dc5f5c8326ec4a Mon Sep 17 00:00:00 2001
From: Pavel Reichl <preichl@redhat.com>
Date: Wed, 11 Oct 2023 22:27:55 +0200
Subject: [PATCH] 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>
---
libfrog/paths.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/libfrog/paths.c b/libfrog/paths.c
index abb29a237..d8c42163a 100644
--- a/libfrog/paths.c
+++ b/libfrog/paths.c
@@ -457,7 +457,8 @@ fs_table_insert_mount(
static int
fs_table_initialise_projects(
- char *project)
+ char *project,
+ bool all_mps_initialised)
{
fs_project_path_t *path;
fs_path_t *fs;
@@ -473,8 +474,10 @@ fs_table_initialise_projects(
continue;
fs = fs_mount_point_from_path(path->pp_pathname);
if (!fs) {
- fprintf(stderr, _("%s: cannot find mount point for path `%s': %s\n"),
- progname, path->pp_pathname, strerror(errno));
+ if (all_mps_initialised)
+ fprintf(stderr,
+ _("%s: cannot find mount point for path `%s': %s\n"), progname,
+ path->pp_pathname, strerror(errno));
continue;
}
(void) fs_table_insert(path->pp_pathname, path->pp_prid,
@@ -495,11 +498,12 @@ fs_table_initialise_projects(
static void
fs_table_insert_project(
- char *project)
+ char *project,
+ bool all_mps_initialised)
{
int error;
- error = fs_table_initialise_projects(project);
+ error = fs_table_initialise_projects(project, all_mps_initialised);
if (error)
fprintf(stderr, _("%s: cannot setup path for project %s: %s\n"),
progname, project, strerror(error));
@@ -532,9 +536,9 @@ fs_table_initialise(
}
if (project_count) {
for (i = 0; i < project_count; i++)
- fs_table_insert_project(projects[i]);
+ fs_table_insert_project(projects[i], mount_count == 0);
} else {
- error = fs_table_initialise_projects(NULL);
+ error = fs_table_initialise_projects(NULL, mount_count == 0);
if (error)
goto out_error;
}
--
2.41.0