From 0b2cd9dc7363cd1141632ea986f8804338c67dc8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 21 Jan 2022 12:10:44 +0100 Subject: [PATCH] findmnt: (verify) ignore passno for btrfs "Traditional filesystems need to run their respective fsck utility in case the filesystem was not unmounted cleanly and the log needs to be replayed before mount. This is not needed for btrfs. You should set fs_passno to 0." https://btrfs.wiki.kernel.org/index.php/FAQ#When_will_Btrfs_have_a_fsck_like_tool.3F" Fixes: https://github.com/util-linux/util-linux/issues/1575 Signed-off-by: Karel Zak --- misc-utils/findmnt-verify.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc-utils/findmnt-verify.c b/misc-utils/findmnt-verify.c index 1577aa9937..624c7205e8 100644 --- a/misc-utils/findmnt-verify.c +++ b/misc-utils/findmnt-verify.c @@ -437,7 +437,7 @@ static int verify_fstype(struct verify_context *vfy) isauto = 1; else if (strcmp(type, "swap") == 0) isswap = 1; - else if (strcmp(type, "xfs") == 0) + else if (strcmp(type, "xfs") == 0 || strcmp(type, "btrfs") == 0) vfy->no_fsck = 1; if (!isswap && !isauto && !none && !is_supported_filesystem(vfy, type)) @@ -455,7 +455,8 @@ static int verify_fstype(struct verify_context *vfy) if (realtype) { isswap = strcmp(realtype, "swap") == 0; - vfy->no_fsck = strcmp(realtype, "xfs") == 0; + vfy->no_fsck = strcmp(realtype, "xfs") == 0 + || strcmp(realtype, "btrfs") == 0; if (type && !isauto && strcmp(type, realtype) != 0) { verify_err(vfy, _("%s does not match with on-disk %s"), type, realtype); -- 2.39.5