From: Karel Zak Date: Fri, 21 Jan 2022 11:10:44 +0000 (+0100) Subject: findmnt: (verify) ignore passno for btrfs X-Git-Tag: v2.38-rc1~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b2cd9dc7363cd1141632ea986f8804338c67dc8;p=thirdparty%2Futil-linux.git 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 --- 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);