From: Andrey Albershteyn Date: Fri, 8 Jul 2022 20:19:48 +0000 (+0200) Subject: udev: enable BLKID_SUBLKS_FSINFO tags X-Git-Tag: v252-rc1~599 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=704116c976bd2133b1bc8fcfe23956b82c50a6a7;p=thirdparty%2Fsystemd.git udev: enable BLKID_SUBLKS_FSINFO tags libblkid gained new tags - FSSIZE, FSLASTBLOCK and FSBLOCKSIZE. These tags are filesystem related properties probed from superblock. All of them are enabled by BLKID_SUBLKS_FSINFO flag. Set the flag to allow these tags to be cached in udev db. --- diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c index c30c78fad51..f992c8f4c5d 100644 --- a/src/udev/udev-builtin-blkid.c +++ b/src/udev/udev-builtin-blkid.c @@ -23,6 +23,7 @@ #include "gpt.h" #include "parse-util.h" #include "string-util.h" +#include "strv.h" #include "strxcpyx.h" #include "udev-builtin.h" @@ -58,6 +59,10 @@ static void print_property(sd_device *dev, bool test, const char *name, const ch blkid_encode_string(value, s, sizeof(s)); udev_builtin_add_property(dev, test, "ID_FS_LABEL_ENC", s); + } else if (STR_IN_SET(name, "FSSIZE", "FSLASTBLOCK", "FSBLOCKSIZE")) { + strscpyl(s, sizeof(s), "ID_FS_", name + 2, NULL); + udev_builtin_add_property(dev, test, s, value); + } else if (streq(name, "PTTYPE")) { udev_builtin_add_property(dev, test, "ID_PART_TABLE_TYPE", value); @@ -293,6 +298,9 @@ static int builtin_blkid(sd_device *dev, sd_netlink **rtnl, int argc, char *argv blkid_probe_set_superblocks_flags(pr, BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE | +#ifdef BLKID_SUBLKS_FSINFO + BLKID_SUBLKS_FSINFO | +#endif BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION); if (noraid)