summaryrefslogtreecommitdiffstats
path: root/misc-utils
diff options
context:
space:
mode:
authorKarel Zak2019-06-12 11:02:51 +0200
committerKarel Zak2019-06-12 11:03:23 +0200
commitf5b7bf155b9881de5b99cc0a23b4dccf9a2d4af3 (patch)
tree8c08d34fe99245a808eb756124146647d9d3ad65 /misc-utils
parentlib/sysfs: fix reference counting for parent (diff)
downloadkernel-qcow2-util-linux-f5b7bf155b9881de5b99cc0a23b4dccf9a2d4af3.tar.gz
kernel-qcow2-util-linux-f5b7bf155b9881de5b99cc0a23b4dccf9a2d4af3.tar.xz
kernel-qcow2-util-linux-f5b7bf155b9881de5b99cc0a23b4dccf9a2d4af3.zip
findmnt: (verify) ignore passno for XFS
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1719069 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/findmnt-verify.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/misc-utils/findmnt-verify.c b/misc-utils/findmnt-verify.c
index 132fe7fb3..2b6f5e7fa 100644
--- a/misc-utils/findmnt-verify.c
+++ b/misc-utils/findmnt-verify.c
@@ -28,7 +28,8 @@ struct verify_context {
int nwarnings;
int nerrors;
- unsigned int target_printed : 1;
+ unsigned int target_printed : 1,
+ no_fsck : 1;
};
static void verify_mesg(struct verify_context *vfy, char type, const char *fmt, va_list ap)
@@ -410,6 +411,8 @@ static int verify_fstype(struct verify_context *vfy)
isauto = 1;
else if (strcmp(type, "swap") == 0)
isswap = 1;
+ else if (strcmp(type, "xfs") == 0)
+ vfy->no_fsck = 1;
if (!isswap && !isauto && !none && !is_supported_filesystem(vfy, type))
verify_warn(vfy, _("%s seems unsupported by the current kernel"), type);
@@ -424,6 +427,7 @@ static int verify_fstype(struct verify_context *vfy)
if (realtype) {
isswap = strcmp(realtype, "swap") == 0;
+ vfy->no_fsck = strcmp(realtype, "xfs") == 0;
if (type && !isauto && strcmp(type, realtype) != 0)
return verify_err(vfy, _("%s does not match with on-disk %s"), type, realtype);
@@ -442,7 +446,7 @@ static int verify_passno(struct verify_context *vfy)
int passno = mnt_fs_get_passno(vfy->fs);
const char *tgt = mnt_fs_get_target(vfy->fs);
- if (tgt && strcmp("/", tgt) == 0 && passno != 1)
+ if (tgt && strcmp("/", tgt) == 0 && passno != 1 && !vfy->no_fsck)
return verify_warn(vfy, _("recommended root FS passno is 1 (current is %d)"), passno);
return 0;
@@ -465,7 +469,7 @@ static int verify_filesystem(struct verify_context *vfy)
if (!rc)
rc = verify_fstype(vfy);
if (!rc)
- rc = verify_passno(vfy);
+ rc = verify_passno(vfy); /* depends on verify_fstype() */
return rc;
}
@@ -494,6 +498,8 @@ int verify_table(struct libmnt_table *tb)
while (rc == 0 && (vfy.fs = get_next_fs(tb, itr))) {
vfy.target_printed = 0;
+ vfy.no_fsck = 0;
+
if (check_order)
rc = verify_order(&vfy);
if (!rc)