From dbeef396f391bf947625f1909e1de8e693c49ff0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 15 2022 07:11:16 +0000 Subject: import util-linux-2.37.4-9.el9 --- diff --git a/SOURCES/0010-lslogins-remove-unexpected-debug-message.patch b/SOURCES/0010-lslogins-remove-unexpected-debug-message.patch new file mode 100644 index 0000000..7bcafbb --- /dev/null +++ b/SOURCES/0010-lslogins-remove-unexpected-debug-message.patch @@ -0,0 +1,28 @@ +From 097fc3427d3221d763f0b1c41923758af2f471a3 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 21 Jul 2022 10:57:36 +0200 +Subject: lslogins: remove unexpected debug message + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2094216 +Signed-off-by: Karel Zak +--- + login-utils/lslogins.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c +index 9431a50bb..c37df9096 100644 +--- a/login-utils/lslogins.c ++++ b/login-utils/lslogins.c +@@ -562,9 +562,6 @@ static int get_sgroups(gid_t **list, size_t *len, struct passwd *pwd) + + *list = xcalloc(1, ngroups * sizeof(gid_t)); + +-fprintf(stderr, "KZAK>>> alloc '%p' for %s\n", *list, pwd->pw_name); +- +- + /* now for the actual list of GIDs */ + if (-1 == getgrouplist(pwd->pw_name, pwd->pw_gid, *list, &ngroups)) + return -1; +-- +2.36.1 + diff --git a/SOURCES/0011-lslogins-improve-prefixes-interpretation.patch b/SOURCES/0011-lslogins-improve-prefixes-interpretation.patch new file mode 100644 index 0000000..eb5ebc6 --- /dev/null +++ b/SOURCES/0011-lslogins-improve-prefixes-interpretation.patch @@ -0,0 +1,92 @@ +From 53339f53ab71c138578d4102a4e4011344d33b2d Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 7 Jun 2022 09:11:56 +0200 +Subject: lslogins: improve prefixes interpretation + +It seems that for example 'passwd --lock' uses two exclamation marks +in password field. It seems better to assume arbitrary number of '!' +and '*' prefixes. + +The patch also makes description of the PWD-EMPTY output field more +explicit. + +Upstream: http://github.com/util-linux/util-linux/commit/c51cba1e838ae7e36a843ec785543492bb8737cd +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2094216 +Signed-off-by: Karel Zak +--- + login-utils/lslogins.c | 33 ++++++++++++++++++++++++++------- + 1 file changed, 26 insertions(+), 7 deletions(-) + +diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c +index c37df9096..1332a9925 100644 +--- a/login-utils/lslogins.c ++++ b/login-utils/lslogins.c +@@ -225,7 +225,7 @@ static const struct lslogins_coldesc coldescs[] = + { + [COL_USER] = { "USER", N_("user name"), N_("Username"), 0.1, SCOLS_FL_NOEXTREMES }, + [COL_UID] = { "UID", N_("user ID"), "UID", 1, SCOLS_FL_RIGHT}, +- [COL_PWDEMPTY] = { "PWD-EMPTY", N_("password not required"), N_("Password not required"), 1, SCOLS_FL_RIGHT }, ++ [COL_PWDEMPTY] = { "PWD-EMPTY", N_("password not defined"), N_("Password not required (empty)"), 1, SCOLS_FL_RIGHT }, + [COL_PWDDENY] = { "PWD-DENY", N_("login by password disabled"), N_("Login by password disabled"), 1, SCOLS_FL_RIGHT }, + [COL_PWDLOCK] = { "PWD-LOCK", N_("password defined, but locked"), N_("Password is locked"), 1, SCOLS_FL_RIGHT }, + [COL_PWDMETHOD] = { "PWD-METHOD", N_("password encryption method"), N_("Password encryption method"), 0.1 }, +@@ -817,23 +817,42 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c + break; + case COL_PWDEMPTY: + if (shadow) { +- if (!*shadow->sp_pwdp) /* '\0' */ ++ const char *p = shadow->sp_pwdp; ++ ++ while (p && (*p == '!' || *p == '*')) ++ p++; ++ ++ if (!p || !*p) + user->pwd_empty = STATUS_TRUE; + } else + user->pwd_empty = STATUS_UNKNOWN; + break; + case COL_PWDDENY: + if (shadow) { +- if ((*shadow->sp_pwdp == '!' || +- *shadow->sp_pwdp == '*') && +- !valid_pwd(shadow->sp_pwdp + 1)) ++ const char *p = shadow->sp_pwdp; ++ ++ while (p && (*p == '!' || *p == '*')) ++ p++; ++ ++ if (p && *p && p != shadow->sp_pwdp && !valid_pwd(p)) + user->pwd_deny = STATUS_TRUE; + } else + user->pwd_deny = STATUS_UNKNOWN; + break; + case COL_PWDLOCK: + if (shadow) { +- if (*shadow->sp_pwdp == '!' && valid_pwd(shadow->sp_pwdp + 1)) ++ const char *p = shadow->sp_pwdp; ++ int i = 0; ++ ++ /* 'passwd --lock' uses two exclamation marks, ++ * shadow(5) describes the lock as "field which ++ * starts with an exclamation mark". Let's ++ * support more '!' ... ++ */ ++ while (p && *p == '!') ++ p++, i++; ++ ++ if (i != 0 && (!*p || valid_pwd(p))) + user->pwd_lock = STATUS_TRUE; + } else + user->pwd_lock = STATUS_UNKNOWN; +@@ -842,7 +861,7 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c + if (shadow) { + const char *p = shadow->sp_pwdp; + +- if (*p == '!' || *p == '*') ++ while (p && (*p == '!' || *p == '*')) + p++; + user->pwd_method = get_pwd_method(p, NULL, NULL); + } else +-- +2.36.1 + diff --git a/SOURCES/0012-lslogins-fix-free-invalid-pointer.patch b/SOURCES/0012-lslogins-fix-free-invalid-pointer.patch new file mode 100644 index 0000000..6017821 --- /dev/null +++ b/SOURCES/0012-lslogins-fix-free-invalid-pointer.patch @@ -0,0 +1,38 @@ +From c269e116ea4d9e96a5f5801aecf1f624199fa6ec Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 7 Jun 2022 09:46:54 +0200 +Subject: lslogins: fix free(): invalid pointer + +Upstream: http://github.com/util-linux/util-linux/commit/890d4d3f236e2d28db35ea9bc9dc3e5e35db975c +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2094216 +Signed-off-by: Karel Zak +--- + login-utils/lslogins.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c +index 1332a9925..ff4386d1b 100644 +--- a/login-utils/lslogins.c ++++ b/login-utils/lslogins.c +@@ -488,7 +488,7 @@ static int parse_utmpx(const char *path, size_t *nrecords, struct utmpx **record + + /* optimize allocation according to file size, the realloc() below is + * just fallback only */ +- if (stat(path, &st) == 0 && (size_t) st.st_size > sizeof(struct utmpx)) { ++ if (stat(path, &st) == 0 && (size_t) st.st_size >= sizeof(struct utmpx)) { + imax = st.st_size / sizeof(struct utmpx); + ary = xmalloc(imax * sizeof(struct utmpx)); + } +@@ -1007,6 +1007,9 @@ static void free_ctl(struct lslogins_control *ctl) + { + size_t n = 0; + ++ if (!ctl) ++ return; ++ + free(ctl->wtmp); + free(ctl->btmp); + +-- +2.36.1 + diff --git a/SOURCES/0013-login-utils-logindefs-fix-compiler-warning-Werror-fo.patch b/SOURCES/0013-login-utils-logindefs-fix-compiler-warning-Werror-fo.patch new file mode 100644 index 0000000..00f4314 --- /dev/null +++ b/SOURCES/0013-login-utils-logindefs-fix-compiler-warning-Werror-fo.patch @@ -0,0 +1,30 @@ +From 1c4ee8348e220b633d676214fd585ee2b3945cf6 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 6 Jun 2022 16:14:14 +0200 +Subject: login-utils/logindefs: fix compiler warning + [-Werror=format-truncation=] + +Upstream: http://github.com/util-linux/util-linux/commit/977f98ee34ca002cb5301c2d3a5953c754f813ec +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2094216 +Signed-off-by: Karel Zak +--- + login-utils/logindefs.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/login-utils/logindefs.c b/login-utils/logindefs.c +index 97150dc28..95631223a 100644 +--- a/login-utils/logindefs.c ++++ b/login-utils/logindefs.c +@@ -521,7 +521,8 @@ int get_hushlogin_status(struct passwd *pwd, int force_check) + if (strlen(pwd->pw_dir) + strlen(file) + 2 > sizeof(buf)) + continue; + +- sprintf(buf, "%s/%s", pwd->pw_dir, file); ++ if (snprintf(buf, sizeof(buf), "%s/%s", pwd->pw_dir, file) < 0) ++ continue; + + if (force_check) { + uid_t ruid = getuid(); +-- +2.36.1 + diff --git a/SOURCES/0014-uuidd-allow-AF_INET-in-systemd-service.patch b/SOURCES/0014-uuidd-allow-AF_INET-in-systemd-service.patch new file mode 100644 index 0000000..aa794e4 --- /dev/null +++ b/SOURCES/0014-uuidd-allow-AF_INET-in-systemd-service.patch @@ -0,0 +1,38 @@ +From 3ceddbb1238e13a51efbe23119c885568e820e69 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 2 Jun 2022 16:55:49 +0200 +Subject: uuidd: allow AF_INET in systemd service + +libuuid uses + + socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) + +to get MAC address for time based UUIDs, but there is + + RestrictAddressFamilies=AF_UNIX + +in uuidd service file ... + +Fixes: https://github.com/util-linux/util-linux/issues/1704 +Upstream: http://github.com/util-linux/util-linux/commit/304b4dc4936b115ca33af5325c3b04d0997c1353 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2092943 +Signed-off-by: Karel Zak +--- + misc-utils/uuidd.service.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/misc-utils/uuidd.service.in b/misc-utils/uuidd.service.in +index e64ca59b5..64580287f 100644 +--- a/misc-utils/uuidd.service.in ++++ b/misc-utils/uuidd.service.in +@@ -16,7 +16,6 @@ PrivateUsers=yes + ProtectKernelTunables=yes + ProtectKernelModules=yes + ProtectControlGroups=yes +-RestrictAddressFamilies=AF_UNIX + MemoryDenyWriteExecute=yes + ReadWritePaths=/var/lib/libuuid/ + SystemCallFilter=@default @file-system @basic-io @system-service @signal @io-event @network-io +-- +2.36.1 + diff --git a/SOURCES/0015-uuidd-remove-also-PrivateNetwork-yes-from-systemd-se.patch b/SOURCES/0015-uuidd-remove-also-PrivateNetwork-yes-from-systemd-se.patch new file mode 100644 index 0000000..62854ce --- /dev/null +++ b/SOURCES/0015-uuidd-remove-also-PrivateNetwork-yes-from-systemd-se.patch @@ -0,0 +1,28 @@ +From bf0cd2995c5e34338703105c62e49a785c6c9dcc Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Fri, 3 Jun 2022 09:07:09 +0200 +Subject: uuidd: remove also PrivateNetwork=yes from systemd service + +Fixes: https://github.com/util-linux/util-linux/issues/1704 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2092943 +Upstream: http://github.com/util-linux/util-linux/commit/c9671a3cf7738bb81e1cbef2f56485a36c6e7623 +Signed-off-by: Karel Zak +--- + misc-utils/uuidd.service.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/misc-utils/uuidd.service.in b/misc-utils/uuidd.service.in +index 64580287f..4ad6d97c9 100644 +--- a/misc-utils/uuidd.service.in ++++ b/misc-utils/uuidd.service.in +@@ -11,7 +11,6 @@ Group=uuidd + ProtectSystem=strict + ProtectHome=yes + PrivateDevices=yes +-PrivateNetwork=yes + PrivateUsers=yes + ProtectKernelTunables=yes + ProtectKernelModules=yes +-- +2.36.1 + diff --git a/SOURCES/0016-lsirq-improve-sort-IRQ.patch b/SOURCES/0016-lsirq-improve-sort-IRQ.patch new file mode 100644 index 0000000..6f6803d --- /dev/null +++ b/SOURCES/0016-lsirq-improve-sort-IRQ.patch @@ -0,0 +1,31 @@ +From 338d5f2876c54e5d811100ba816d3a6dec00ab11 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Fri, 29 Apr 2022 10:11:49 +0200 +Subject: lsirq: improve --sort IRQ + +IRQ column mixes numbers and text, it seems better to use strverscmp() +rather than classic strcmp(). + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2078787 +Upstream: http://github.com/util-linux/util-linux/commit/d382861c0815ff241fb2844a2a896f0fb1c7b73e +Signed-off-by: Karel Zak +--- + sys-utils/irq-common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sys-utils/irq-common.c b/sys-utils/irq-common.c +index 350675394..22080b96d 100644 +--- a/sys-utils/irq-common.c ++++ b/sys-utils/irq-common.c +@@ -371,7 +371,7 @@ static inline int cmp_delta(const struct irq_info *a, + static inline int cmp_interrupts(const struct irq_info *a, + const struct irq_info *b) + { +- return (strcmp(a->irq, b->irq) > 0) ? 1 : 0; ++ return (strverscmp(a->irq, b->irq) > 0) ? 1 : 0; + } + + static void sort_result(struct irq_output *out, +-- +2.36.1 + diff --git a/SOURCES/0017-irqtop-fix-compiler-warning-Werror-format-truncation.patch b/SOURCES/0017-irqtop-fix-compiler-warning-Werror-format-truncation.patch new file mode 100644 index 0000000..7eaf7fb --- /dev/null +++ b/SOURCES/0017-irqtop-fix-compiler-warning-Werror-format-truncation.patch @@ -0,0 +1,28 @@ +From de0402358f6d363a57e6fef98c92a9eef5690cdd Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 6 Jun 2022 16:14:30 +0200 +Subject: irqtop: fix compiler warning [-Werror=format-truncation=] + +Upstream: http://github.com/util-linux/util-linux/commit/b7865ae165bb43b1626c6928250843cc2c96be57 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2078787 +Signed-off-by: Karel Zak +--- + sys-utils/irq-common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sys-utils/irq-common.c b/sys-utils/irq-common.c +index 22080b96d..e39ef823c 100644 +--- a/sys-utils/irq-common.c ++++ b/sys-utils/irq-common.c +@@ -426,7 +426,7 @@ struct libscols_table *get_scols_cpus_table(struct irq_output *out, + struct libscols_table *table; + struct libscols_column *cl; + struct libscols_line *ln; +- char colname[sizeof(stringify_value(LONG_MAX))]; ++ char colname[sizeof("cpu") + sizeof(stringify_value(LONG_MAX))]; + size_t i; + + if (prev) { +-- +2.36.1 + diff --git a/SOURCES/0018-dmesg-fix-since-and-until.patch b/SOURCES/0018-dmesg-fix-since-and-until.patch new file mode 100644 index 0000000..61431b5 --- /dev/null +++ b/SOURCES/0018-dmesg-fix-since-and-until.patch @@ -0,0 +1,34 @@ +From f45fe0768ac09cb5e05b095afa47a0a71e931f84 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 20 Apr 2022 14:42:32 +0200 +Subject: dmesg: fix --since and --until + +Now --since and --until requires any time field in the output (e.g. +--ctime,-T), it means "dmesg --since '1 day ago'" doesn't work, but +"dmesg -T --since '1 day ago'" works as expected. + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2076829 +Upstream: http://github.com/util-linux/util-linux/commit/c9667633f1f6b7a84116f2af067d1d15c72e6382 +Signed-off-by: Karel Zak +--- + sys-utils/dmesg.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c +index d301951bb..5c580107a 100644 +--- a/sys-utils/dmesg.c ++++ b/sys-utils/dmesg.c +@@ -1539,7 +1539,9 @@ int main(int argc, char *argv[]) + + if ((is_timefmt(&ctl, RELTIME) || + is_timefmt(&ctl, CTIME) || +- is_timefmt(&ctl, ISO8601))) { ++ is_timefmt(&ctl, ISO8601)) || ++ ctl.since || ++ ctl.until) { + if (dmesg_get_boot_time(&ctl.boot_time) != 0) + ctl.time_fmt = DMESG_TIMEFTM_NONE; + else +-- +2.36.1 + diff --git a/SOURCES/0019-libblkid-check-fsync-return-code.patch b/SOURCES/0019-libblkid-check-fsync-return-code.patch new file mode 100644 index 0000000..b46cade --- /dev/null +++ b/SOURCES/0019-libblkid-check-fsync-return-code.patch @@ -0,0 +1,62 @@ +From f02e9004303df5ab3d9b868f6f60af44663cce69 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 19 Apr 2022 09:44:07 +0200 +Subject: libblkid: check fsync() return code + +Since 39f5af25982d8b0244000e92a9d0e0e6557d0e17 libblkid uses +O_NONBLOCK. Now it's more obvious that check fsync() (and close()) +return value after write() is always a good idea ... + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2074486 +Upstream: http://github.com/util-linux/util-linux/commit/133a0d70f637b4f4e4337811e452153b04f2bdcf +Signed-off-by: Karel Zak +--- + libblkid/src/probe.c | 5 ++++- + misc-utils/wipefs.c | 8 ++++++-- + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c +index 5f01bc3b3..d317dc19a 100644 +--- a/libblkid/src/probe.c ++++ b/libblkid/src/probe.c +@@ -1298,7 +1298,10 @@ int blkid_do_wipe(blkid_probe pr, int dryrun) + /* wipen on device */ + if (write_all(fd, buf, len)) + return -1; +- fsync(fd); ++ ++ if (fsync(fd) != 0) ++ return -1; ++ + pr->flags &= ~BLKID_FL_MODIF_BUFF; /* be paranoid */ + + return blkid_probe_step_back(pr); +diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c +index 78dc63ee7..f08a9ba4f 100644 +--- a/misc-utils/wipefs.c ++++ b/misc-utils/wipefs.c +@@ -615,7 +615,9 @@ static int do_wipe(struct wipe_control *ctl) + if (need_force) + warnx(_("Use the --force option to force erase.")); + +- fsync(blkid_probe_get_fd(pr)); ++ if (fsync(blkid_probe_get_fd(pr)) != 0) ++ err(EXIT_FAILURE, _("%s: cannot flush modified buffers"), ++ ctl->devname); + + #ifdef BLKRRPART + if (reread && (mode & O_EXCL)) { +@@ -635,7 +637,9 @@ static int do_wipe(struct wipe_control *ctl) + } + #endif + +- close(blkid_probe_get_fd(pr)); ++ if (close(blkid_probe_get_fd(pr)) != 0) ++ err(EXIT_FAILURE, _("%s: close device failed"), ctl->devname); ++ + blkid_free_probe(pr); + free(backup); + return 0; +-- +2.36.1 + diff --git a/SOURCES/0020-libblkid-add-interface-for-FSSIZE-field.patch b/SOURCES/0020-libblkid-add-interface-for-FSSIZE-field.patch new file mode 100644 index 0000000..cd0161e --- /dev/null +++ b/SOURCES/0020-libblkid-add-interface-for-FSSIZE-field.patch @@ -0,0 +1,87 @@ +From 863ecca27cfc937bc6fb2131e0d0e35947e38ce6 Mon Sep 17 00:00:00 2001 +From: Andrey Albershteyn +Date: Mon, 25 Apr 2022 17:08:37 +0200 +Subject: libblkid: add interface for FSSIZE field + +Add interface to let filesystem probe calculate and set FSSIZE. +Enable that field in the 'superblocks' sample. + +Upstream: http://github.com/util-linux/util-linux/commit/ad08ae0aa +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Andrey Albershteyn +--- + libblkid/samples/superblocks.c | 2 +- + libblkid/src/blkid.h.in | 1 + + libblkid/src/superblocks/superblocks.c | 11 +++++++++++ + libblkid/src/superblocks/superblocks.h | 1 + + 4 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/libblkid/samples/superblocks.c b/libblkid/samples/superblocks.c +index 7d9555771..38903ecee 100644 +--- a/libblkid/samples/superblocks.c ++++ b/libblkid/samples/superblocks.c +@@ -44,7 +44,7 @@ int main(int argc, char *argv[]) + BLKID_SUBLKS_UUID | BLKID_SUBLKS_UUIDRAW | + BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE | + BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION | +- BLKID_SUBLKS_MAGIC); ++ BLKID_SUBLKS_MAGIC | BLKID_SUBLKS_FSSIZE); + + rc = blkid_do_safeprobe(pr); + if (rc == -1) +diff --git a/libblkid/src/blkid.h.in b/libblkid/src/blkid.h.in +index 3cd4116d9..ad4becf0a 100644 +--- a/libblkid/src/blkid.h.in ++++ b/libblkid/src/blkid.h.in +@@ -281,6 +281,7 @@ extern int blkid_probe_enable_superblocks(blkid_probe pr, int enable) + #define BLKID_SUBLKS_VERSION (1 << 8) /* read FS type from superblock */ + #define BLKID_SUBLKS_MAGIC (1 << 9) /* define SBMAGIC and SBMAGIC_OFFSET */ + #define BLKID_SUBLKS_BADCSUM (1 << 10) /* allow a bad checksum */ ++#define BLKID_SUBLKS_FSSIZE (1 << 11) /* read and define FSSIZE from superblock */ + + #define BLKID_SUBLKS_DEFAULT (BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | \ + BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE) +diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c +index f21365538..9adc2cfa3 100644 +--- a/libblkid/src/superblocks/superblocks.c ++++ b/libblkid/src/superblocks/superblocks.c +@@ -7,6 +7,7 @@ + * GNU Lesser General Public License. + */ + ++#include + #include + #include + #include +@@ -584,6 +585,16 @@ static int blkid_probe_set_usage(blkid_probe pr, int usage) + return blkid_probe_set_value(pr, "USAGE", (unsigned char *) u, strlen(u) + 1); + } + ++int blkid_probe_set_fssize(blkid_probe pr, uint64_t size) ++{ ++ struct blkid_chain *chn = blkid_probe_get_chain(pr); ++ ++ if (!(chn->flags & BLKID_SUBLKS_FSSIZE)) ++ return 0; ++ ++ return blkid_probe_sprintf_value(pr, "FSSIZE", "%" PRIu64, size); ++} ++ + int blkid_probe_set_id_label(blkid_probe pr, const char *name, + const unsigned char *data, size_t len) + { +diff --git a/libblkid/src/superblocks/superblocks.h b/libblkid/src/superblocks/superblocks.h +index 9c489c438..67803679f 100644 +--- a/libblkid/src/superblocks/superblocks.h ++++ b/libblkid/src/superblocks/superblocks.h +@@ -111,6 +111,7 @@ extern int blkid_probe_set_utf8_id_label(blkid_probe pr, const char *name, + const unsigned char *data, size_t len, int enc); + + int blkid_probe_set_block_size(blkid_probe pr, unsigned block_size); ++int blkid_probe_set_fssize(blkid_probe pr, uint64_t size); + + extern int blkid_probe_is_bitlocker(blkid_probe pr); + extern int blkid_probe_is_ntfs(blkid_probe pr); +-- +2.36.1 + diff --git a/SOURCES/0021-libblkid-implement-FSSIZE-calculation-for-XFS.patch b/SOURCES/0021-libblkid-implement-FSSIZE-calculation-for-XFS.patch new file mode 100644 index 0000000..d899c3f --- /dev/null +++ b/SOURCES/0021-libblkid-implement-FSSIZE-calculation-for-XFS.patch @@ -0,0 +1,45 @@ +From e81cc68312e91ab7086188542f3377605bf144a8 Mon Sep 17 00:00:00 2001 +From: Andrey Albershteyn +Date: Mon, 25 Apr 2022 17:08:38 +0200 +Subject: libblkid: implement FSSIZE calculation for XFS + +The implementation is similar to one provided by statfs(2) + lsblk. + +Upstream: http://github.com/util-linux/util-linux/commit/d7ec8fe8e +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Andrey Albershteyn +--- + libblkid/src/superblocks/xfs.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c +index d8c6fb6d4..444050f55 100644 +--- a/libblkid/src/superblocks/xfs.c ++++ b/libblkid/src/superblocks/xfs.c +@@ -158,6 +158,15 @@ static int xfs_verify_sb(struct xfs_super_block *ondisk) + return 1; + } + ++static uint64_t xfs_fssize(struct xfs_super_block *xs) ++{ ++ uint32_t lsize = xs->sb_logstart ? xs->sb_logblocks : 0; ++ uint64_t avail_blocks = be64_to_cpu(xs->sb_dblocks) - be32_to_cpu(lsize); ++ uint64_t fssize = avail_blocks*be32_to_cpu(xs->sb_blocksize); ++ ++ return fssize; ++} ++ + static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) + { + struct xfs_super_block *xs; +@@ -173,6 +182,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) + blkid_probe_set_label(pr, (unsigned char *) xs->sb_fname, + sizeof(xs->sb_fname)); + blkid_probe_set_uuid(pr, xs->sb_uuid); ++ blkid_probe_set_fssize(pr, xfs_fssize(xs)); + blkid_probe_set_block_size(pr, be16_to_cpu(xs->sb_sectsize)); + return 0; + } +-- +2.36.1 + diff --git a/SOURCES/0022-blkid-add-FSSIZE-tag-with-tests-for-XFS.patch b/SOURCES/0022-blkid-add-FSSIZE-tag-with-tests-for-XFS.patch new file mode 100644 index 0000000..9cfe63c --- /dev/null +++ b/SOURCES/0022-blkid-add-FSSIZE-tag-with-tests-for-XFS.patch @@ -0,0 +1,54 @@ +From d3d0e6dc70889e5fe9d9dfeab67e9ba1f0491a28 Mon Sep 17 00:00:00 2001 +From: Andrey Albershteyn +Date: Mon, 25 Apr 2022 17:08:39 +0200 +Subject: blkid: add FSSIZE tag with tests for XFS + +The FSSIZE tag was added to the libblkid. Enable this tag in blkid +and update tests golden output for XFS test cases. + +Upstream: http://github.com/util-linux/util-linux/commit/60cedc921 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Andrey Albershteyn +--- + misc-utils/blkid.c | 3 ++- + tests/expected/blkid/low-probe-xfs | 1 + + tests/expected/blkid/low-probe-xfs-v5 | 1 + + 3 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c +index cccd8af87..4f456be52 100644 +--- a/misc-utils/blkid.c ++++ b/misc-utils/blkid.c +@@ -892,7 +892,8 @@ int main(int argc, char **argv) + blkid_probe_set_superblocks_flags(pr, + BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | + BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE | +- BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION); ++ BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION | ++ BLKID_SUBLKS_FSSIZE); + + + if (fltr_usage && +diff --git a/tests/expected/blkid/low-probe-xfs b/tests/expected/blkid/low-probe-xfs +index 6eb1b4600..a91e92bcc 100644 +--- a/tests/expected/blkid/low-probe-xfs ++++ b/tests/expected/blkid/low-probe-xfs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSSIZE=11862016 + ID_FS_LABEL=test-xfs + ID_FS_LABEL_ENC=test-xfs + ID_FS_TYPE=xfs +diff --git a/tests/expected/blkid/low-probe-xfs-v5 b/tests/expected/blkid/low-probe-xfs-v5 +index 513a3818f..129b41f26 100644 +--- a/tests/expected/blkid/low-probe-xfs-v5 ++++ b/tests/expected/blkid/low-probe-xfs-v5 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSSIZE=17469440 + ID_FS_LABEL=test-xfs-v5 + ID_FS_LABEL_ENC=test-xfs-v5 + ID_FS_TYPE=xfs +-- +2.36.1 + diff --git a/SOURCES/0023-libblkid-fix-FSSIZE-docs.patch b/SOURCES/0023-libblkid-fix-FSSIZE-docs.patch new file mode 100644 index 0000000..4c18ac6 --- /dev/null +++ b/SOURCES/0023-libblkid-fix-FSSIZE-docs.patch @@ -0,0 +1,28 @@ +From 8ae64e23bc34fd939586705f64a93676bae8c2b2 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 26 Apr 2022 10:32:05 +0200 +Subject: libblkid: fix FSSIZE docs + +Upstream: http://github.com/util-linux/util-linux/commit/9c01f798f +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Karel Zak +--- + libblkid/src/superblocks/superblocks.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c +index 9adc2cfa3..adf4ee025 100644 +--- a/libblkid/src/superblocks/superblocks.c ++++ b/libblkid/src/superblocks/superblocks.c +@@ -66,7 +66,7 @@ + * + * @SBMAGIC_OFFSET: offset of SBMAGIC + * +- * @FSSIZE: size of filesystem [not-implemented yet] ++ * @FSSIZE: size of filesystem (implemented for XFS only) + * + * @SYSTEM_ID: ISO9660 system identifier + * +-- +2.36.1 + diff --git a/SOURCES/0024-libblkid-add-FSLASTBLOCK-field-interface-showing-are.patch b/SOURCES/0024-libblkid-add-FSLASTBLOCK-field-interface-showing-are.patch new file mode 100644 index 0000000..a79980e --- /dev/null +++ b/SOURCES/0024-libblkid-add-FSLASTBLOCK-field-interface-showing-are.patch @@ -0,0 +1,113 @@ +From fb9ea75a8a69b06eb6a4039b841ce3ccabb76775 Mon Sep 17 00:00:00 2001 +From: Andrey Albershteyn +Date: Wed, 27 Apr 2022 13:24:56 +0200 +Subject: libblkid: add FSLASTBLOCK field interface showing area occupied by fs + +Add interface to let filesystem set FSLASTBLOCK which is basically +total number of fsblocks (area occupied by fs). Enable that field in +the 'superblocks' sample. + +Upstream: http://github.com/util-linux/util-linux/commit/b7cb26ec3 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Andrey Albershteyn +--- + libblkid/samples/superblocks.c | 3 ++- + libblkid/src/blkid.h.in | 23 ++++++++++++----------- + libblkid/src/superblocks/superblocks.c | 13 +++++++++++++ + libblkid/src/superblocks/superblocks.h | 1 + + 4 files changed, 28 insertions(+), 12 deletions(-) + +diff --git a/libblkid/samples/superblocks.c b/libblkid/samples/superblocks.c +index 38903ecee..b7f94ec14 100644 +--- a/libblkid/samples/superblocks.c ++++ b/libblkid/samples/superblocks.c +@@ -44,7 +44,8 @@ int main(int argc, char *argv[]) + BLKID_SUBLKS_UUID | BLKID_SUBLKS_UUIDRAW | + BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE | + BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION | +- BLKID_SUBLKS_MAGIC | BLKID_SUBLKS_FSSIZE); ++ BLKID_SUBLKS_MAGIC | BLKID_SUBLKS_FSSIZE | ++ BLKID_SUBLKS_FSLASTBLOCK); + + rc = blkid_do_safeprobe(pr); + if (rc == -1) +diff --git a/libblkid/src/blkid.h.in b/libblkid/src/blkid.h.in +index ad4becf0a..56e64f9ab 100644 +--- a/libblkid/src/blkid.h.in ++++ b/libblkid/src/blkid.h.in +@@ -271,17 +271,18 @@ extern int blkid_superblocks_get_name(size_t idx, const char **name, int *usage) + extern int blkid_probe_enable_superblocks(blkid_probe pr, int enable) + __ul_attribute__((nonnull)); + +-#define BLKID_SUBLKS_LABEL (1 << 1) /* read LABEL from superblock */ +-#define BLKID_SUBLKS_LABELRAW (1 << 2) /* read and define LABEL_RAW result value*/ +-#define BLKID_SUBLKS_UUID (1 << 3) /* read UUID from superblock */ +-#define BLKID_SUBLKS_UUIDRAW (1 << 4) /* read and define UUID_RAW result value */ +-#define BLKID_SUBLKS_TYPE (1 << 5) /* define TYPE result value */ +-#define BLKID_SUBLKS_SECTYPE (1 << 6) /* define compatible fs type (second type) */ +-#define BLKID_SUBLKS_USAGE (1 << 7) /* define USAGE result value */ +-#define BLKID_SUBLKS_VERSION (1 << 8) /* read FS type from superblock */ +-#define BLKID_SUBLKS_MAGIC (1 << 9) /* define SBMAGIC and SBMAGIC_OFFSET */ +-#define BLKID_SUBLKS_BADCSUM (1 << 10) /* allow a bad checksum */ +-#define BLKID_SUBLKS_FSSIZE (1 << 11) /* read and define FSSIZE from superblock */ ++#define BLKID_SUBLKS_LABEL (1 << 1) /* read LABEL from superblock */ ++#define BLKID_SUBLKS_LABELRAW (1 << 2) /* read and define LABEL_RAW result value*/ ++#define BLKID_SUBLKS_UUID (1 << 3) /* read UUID from superblock */ ++#define BLKID_SUBLKS_UUIDRAW (1 << 4) /* read and define UUID_RAW result value */ ++#define BLKID_SUBLKS_TYPE (1 << 5) /* define TYPE result value */ ++#define BLKID_SUBLKS_SECTYPE (1 << 6) /* define compatible fs type (second type) */ ++#define BLKID_SUBLKS_USAGE (1 << 7) /* define USAGE result value */ ++#define BLKID_SUBLKS_VERSION (1 << 8) /* read FS type from superblock */ ++#define BLKID_SUBLKS_MAGIC (1 << 9) /* define SBMAGIC and SBMAGIC_OFFSET */ ++#define BLKID_SUBLKS_BADCSUM (1 << 10) /* allow a bad checksum */ ++#define BLKID_SUBLKS_FSSIZE (1 << 11) /* read and define FSSIZE from superblock */ ++#define BLKID_SUBLKS_FSLASTBLOCK (1 << 12) /* read and define FSLASTBLOCK from superblock */ + + #define BLKID_SUBLKS_DEFAULT (BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | \ + BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE) +diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c +index adf4ee025..5b899a830 100644 +--- a/libblkid/src/superblocks/superblocks.c ++++ b/libblkid/src/superblocks/superblocks.c +@@ -68,6 +68,8 @@ + * + * @FSSIZE: size of filesystem (implemented for XFS only) + * ++ * @FSLASTBLOCK: last fsblock/total number of fsblocks ++ * + * @SYSTEM_ID: ISO9660 system identifier + * + * @PUBLISHER_ID: ISO9660 publisher identifier +@@ -595,6 +597,17 @@ int blkid_probe_set_fssize(blkid_probe pr, uint64_t size) + return blkid_probe_sprintf_value(pr, "FSSIZE", "%" PRIu64, size); + } + ++int blkid_probe_set_fslastblock(blkid_probe pr, uint64_t lastblock) ++{ ++ struct blkid_chain *chn = blkid_probe_get_chain(pr); ++ ++ if (!(chn->flags & BLKID_SUBLKS_FSLASTBLOCK)) ++ return 0; ++ ++ return blkid_probe_sprintf_value(pr, "FSLASTBLOCK", "%" PRIu64, ++ lastblock); ++} ++ + int blkid_probe_set_id_label(blkid_probe pr, const char *name, + const unsigned char *data, size_t len) + { +diff --git a/libblkid/src/superblocks/superblocks.h b/libblkid/src/superblocks/superblocks.h +index 67803679f..251e2e386 100644 +--- a/libblkid/src/superblocks/superblocks.h ++++ b/libblkid/src/superblocks/superblocks.h +@@ -112,6 +112,7 @@ extern int blkid_probe_set_utf8_id_label(blkid_probe pr, const char *name, + + int blkid_probe_set_block_size(blkid_probe pr, unsigned block_size); + int blkid_probe_set_fssize(blkid_probe pr, uint64_t size); ++int blkid_probe_set_fslastblock(blkid_probe pr, uint64_t lastblock); + + extern int blkid_probe_is_bitlocker(blkid_probe pr); + extern int blkid_probe_is_ntfs(blkid_probe pr); +-- +2.36.1 + diff --git a/SOURCES/0025-libblkid-add-FSLASTBLOCK-implementation-for-xfs-ext-.patch b/SOURCES/0025-libblkid-add-FSLASTBLOCK-implementation-for-xfs-ext-.patch new file mode 100644 index 0000000..5cb8bfc --- /dev/null +++ b/SOURCES/0025-libblkid-add-FSLASTBLOCK-implementation-for-xfs-ext-.patch @@ -0,0 +1,86 @@ +From 9c7f3317fc66fe971a331dd71e76aff7ae091ab2 Mon Sep 17 00:00:00 2001 +From: Andrey Albershteyn +Date: Wed, 27 Apr 2022 14:46:33 +0200 +Subject: libblkid: add FSLASTBLOCK implementation for xfs, ext and btrfs + +Implementation of FSLASTBLOCK for most common filesystems. Most of +the fs store total number of reserved blocks in superblock. + +Upstream: http://github.com/util-linux/util-linux/commit/5f995b3f1 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Andrey Albershteyn +--- + libblkid/src/superblocks/btrfs.c | 5 +++++ + libblkid/src/superblocks/ext.c | 10 ++++++++-- + libblkid/src/superblocks/xfs.c | 1 + + 3 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/libblkid/src/superblocks/btrfs.c b/libblkid/src/superblocks/btrfs.c +index f0fde700d..9708f2e28 100644 +--- a/libblkid/src/superblocks/btrfs.c ++++ b/libblkid/src/superblocks/btrfs.c +@@ -76,6 +76,11 @@ static int probe_btrfs(blkid_probe pr, const struct blkid_idmag *mag) + blkid_probe_set_uuid_as(pr, bfs->dev_item.uuid, "UUID_SUB"); + blkid_probe_set_block_size(pr, le32_to_cpu(bfs->sectorsize)); + ++ uint32_t sectorsize_log = 31 - ++ __builtin_clz(le32_to_cpu(bfs->sectorsize)); ++ blkid_probe_set_fslastblock(pr, ++ le64_to_cpu(bfs->total_bytes) >> sectorsize_log); ++ + return 0; + } + +diff --git a/libblkid/src/superblocks/ext.c b/libblkid/src/superblocks/ext.c +index 3870522fa..0b9023734 100644 +--- a/libblkid/src/superblocks/ext.c ++++ b/libblkid/src/superblocks/ext.c +@@ -164,10 +164,11 @@ static struct ext2_super_block *ext_get_super( + static void ext_get_info(blkid_probe pr, int ver, struct ext2_super_block *es) + { + struct blkid_chain *chn = blkid_probe_get_chain(pr); ++ uint32_t s_feature_incompat = le32_to_cpu(es->s_feature_incompat); + + DBG(PROBE, ul_debug("ext2_sb.compat = %08X:%08X:%08X", + le32_to_cpu(es->s_feature_compat), +- le32_to_cpu(es->s_feature_incompat), ++ s_feature_incompat, + le32_to_cpu(es->s_feature_ro_compat))); + + if (*es->s_volume_name != '\0') +@@ -179,7 +180,7 @@ static void ext_get_info(blkid_probe pr, int ver, struct ext2_super_block *es) + blkid_probe_set_uuid_as(pr, es->s_journal_uuid, "EXT_JOURNAL"); + + if (ver != 2 && (chn->flags & BLKID_SUBLKS_SECTYPE) && +- ((le32_to_cpu(es->s_feature_incompat) & EXT2_FEATURE_INCOMPAT_UNSUPPORTED) == 0)) ++ ((s_feature_incompat & EXT2_FEATURE_INCOMPAT_UNSUPPORTED) == 0)) + blkid_probe_set_value(pr, "SEC_TYPE", + (unsigned char *) "ext2", + sizeof("ext2")); +@@ -190,6 +191,11 @@ static void ext_get_info(blkid_probe pr, int ver, struct ext2_super_block *es) + + if (le32_to_cpu(es->s_log_block_size) < 32) + blkid_probe_set_block_size(pr, 1024U << le32_to_cpu(es->s_log_block_size)); ++ ++ uint64_t fslastblock = le32_to_cpu(es->s_blocks_count) | ++ ((s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) ? ++ (uint64_t) le32_to_cpu(es->s_blocks_count_hi) << 32 : 0); ++ blkid_probe_set_fslastblock(pr, fslastblock); + } + + +diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c +index 444050f55..1f2e92cac 100644 +--- a/libblkid/src/superblocks/xfs.c ++++ b/libblkid/src/superblocks/xfs.c +@@ -183,6 +183,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) + sizeof(xs->sb_fname)); + blkid_probe_set_uuid(pr, xs->sb_uuid); + blkid_probe_set_fssize(pr, xfs_fssize(xs)); ++ blkid_probe_set_fslastblock(pr, be64_to_cpu(xs->sb_dblocks)); + blkid_probe_set_block_size(pr, be16_to_cpu(xs->sb_sectsize)); + return 0; + } +-- +2.36.1 + diff --git a/SOURCES/0026-blkid-add-image-for-btrfs-testing.patch b/SOURCES/0026-blkid-add-image-for-btrfs-testing.patch new file mode 100644 index 0000000..f338669 --- /dev/null +++ b/SOURCES/0026-blkid-add-image-for-btrfs-testing.patch @@ -0,0 +1,146 @@ +From ab34732c0aaf7814393acbffa59cb82a79583e3d Mon Sep 17 00:00:00 2001 +From: Andrey Albershteyn +Date: Wed, 27 Apr 2022 17:29:27 +0200 +Subject: blkid: add image for btrfs testing + +The btrfs is one of the popular filesystem which is supported by +blkid. However, the image for 'low-probe' tests was missing. Add +115M BTRFS default image (mkfs.btrfs btrfs.img). + +Upstream: http://github.com/util-linux/util-linux/commit/bf64c83ec +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Andrey Albershteyn +--- + tests/expected/blkid/low-probe-btrfs | 7 +++++++ + tests/ts/blkid/images-fs/btrfs.img.xz | Bin 0 -> 21696 bytes + 2 files changed, 7 insertions(+) + create mode 100644 tests/expected/blkid/low-probe-btrfs + create mode 100644 tests/ts/blkid/images-fs/btrfs.img.xz + +diff --git a/tests/expected/blkid/low-probe-btrfs b/tests/expected/blkid/low-probe-btrfs +new file mode 100644 +index 000000000..509fac378 +--- /dev/null ++++ b/tests/expected/blkid/low-probe-btrfs +@@ -0,0 +1,7 @@ ++ID_FS_BLOCK_SIZE=4096 ++ID_FS_TYPE=btrfs ++ID_FS_USAGE=filesystem ++ID_FS_UUID=d4a78b72-55e4-4811-86a6-09af936d43f9 ++ID_FS_UUID_ENC=d4a78b72-55e4-4811-86a6-09af936d43f9 ++ID_FS_UUID_SUB=1e7603cb-d0be-4d8f-8972-9dddf7d5543c ++ID_FS_UUID_SUB_ENC=1e7603cb-d0be-4d8f-8972-9dddf7d5543c +diff --git a/tests/ts/blkid/images-fs/btrfs.img.xz b/tests/ts/blkid/images-fs/btrfs.img.xz +new file mode 100644 +index 0000000000000000000000000000000000000000..418833d42078492f0266d73b22170d5626b80cc0 +GIT binary patch +literal 21696 +zcmeHPWl)@3wr!vxA$V{Jnm`i>F2UU`&>ggapuwF42rj|hEhI>A2pXKm5}KLLtv{u0APQ8dz4>@S+Y`muuM4>+{+KA8aewyo-VB{m>>0`~^I2_F~pQ?-v<%pRQb2;}K`YK-P^&vwUP +zXVCRhRXj*+F)SwIc5>i8C;3%I0iQ5t1!M340lC< +zJNqTP7*oBYGiqzf;Y#-)_UYvj7l!5pT$Ufzd^?ONf<~|eSw>EKCg`8Y9Ept&MxTZ6 +zF0>S!M_I}?`=$G|kU8gzxej?`x=AMWrL>Dgne>#COY;a4VO(!Phg8cMK?#mDBGC^K +z4)5|A47Wk>py9-nFz?5)hfJ<#jBm6Yqr^6?nF&PU+$lUP1Z^t?~I_H7O-a@fPM +z1VyDU9yAP8Fp)uZ-fo&}Xt!*>D$!Y4)kD8~@pZcN>QaNnrJq`lR`OyFEOO3liYep^ +z$I2;Pm{so+JUXa(@QuC-D2hcbWQ1Ec#0*I>s!^L(gsXkp!jfy|1b*aYh~Ggtmn9I* +zVB(11)iRWsg;l(cXk(PPB-}Iy*4IczMS)xVZin2P%phzn(HW=nP{D8>#%JzPJ>?t +zV8w@R+S~F{zF$E}ua!#m^rM|mlAD){$uLBiJY81vmGFS{$o2C6>`D@G-!`@wJlEVl +zeT#KukF1@mq1oJs)S5^QBL}Vcf-E(;bh&xa%&vZV#ix)lqRAHDz=kDgPZvAYqNi99 +zww?C87FFBOk{Yb;)rCc?aOcMpUYoAqNbW{cpwZJCd#n|=QW(Vd4STDShgVQ0_U|Kdfa{+*s@vO5L}@Uqz? +z+IzlQef}pUgr2jxIPN$dx4j8ZIzz}Wr2>a1od`$|cGQ$x!|s$V_RUWpSDvR@OWRAt +zxk8rbJA*U5>>rzF_OvmR?9P9sy3r}j6n?6JVRCR)MH8qCk^u`|^I5?|03oz}HuUSu +zrDRzdE87n6B>$e!NV$S{-^rVMn|Gr$)B{?pF7U*vaYu7cdo*naC3mK`;u9c{LaX}@ +zk4M&C4RKg+<=!Xf7#=SgI4oxKr_~M>{TBR+#>?)3NNg&P4Vnx&VL({sPW*>)+qki) +zX>)|?cac;D5|+dZxgVLtI%oX4;=YV(F7H&n2)!MZgm+;oUlpa@>>LcgOwdW?p4+;J_-w9+ZmjH-BRYsNs;wAlGE<5 +z!rNn;g&Lv#&So~lB0NzgbIBM&+*|zkb4NFwbFBW`M35|A;g#q7Wf}*YCM-JWD8LV9 +z_Md|KANsXAo>*np?GTXbS1efHcKWn2x|YLQIv!iX>kn7s5>uhCv(%3@6W%+vz7`OU +zkJBl1U{cxro?zHPY_^;5#^O6HrTOL%tRSm=WPY*@Y%r<&9uv~gU&Lp8q%d53{7w5? +zhHgLVEm^5o6Ur2s=p1ftaH!+eb^>TD)K04ppQmwqe3u>yHoNCHeYX4%s9c*} +zNuGH0D#sKBG&){-8C1iCp68+E8_xk%Iw*Vi=Cx{zjE2jZw3`Y*Y>5^*anc9+ib_O4?bFdU;bMyKZEB0 +zGPBTdS-oH^>W0t9{1{!qnWh2HV0m1`^h=-OJ9unJCQK8GBQa3(v>pZa)Z)sUA6Ir+ +zNzk@BMzuZW86&WuRpJ%#&lkvWSsV!OF03vFx!SM#qvZE;5z4U9b(BtyV0_z>Q4{{OvI>?@ad-Xf5r(I9Ac~(jh3QG6=|B9M1+(6YC}p9C9giH)OoM@TTGK?U>Y$Km~l=5r5J# +z4{zfFb@wq@za_XzqnO{QEkRw~7%QF6gJo`nyianMaCD96IpA=#kor-L>(OC|rjmu( +zk3ruyZc3*^L3%fmqWp&Z#DeoU@F2u0I{bR2^*~_F5Wk^vdt$XgZB=oJQ1AuCHYoT8mC;w;;R1Kor>$qi7Pr +zd{UDUtv3Mx%FN4+Fh#sif~@qF+;64{Mx6UvvV$MI?*L3F+fUu@)KVscPv2;LChjl8 +zuK^zu%`G}X7hj`k3+E^A11*^^$w3F4A2TFsyzW?QJua>ckLM1JHI!(0Rj+W_@xwR3 +zb%(bdU~^&S)U2_9=)Q5Mt0~})HV*XCRX2`vQGj;Z{zY0MS_=)1R0l|P@KY`*lDmJW +zZT!C|SPTmHFUj5WtF9H{%q%&vc0%T*!{gebwOncI(k%5*S*O%#fM_WrOdJqhL$3Q= +z0MVQ+s%hpee>~)(8IS?A>ua9c2rEr~a?7@r_Iv&JpDJY3T(&fl%aB}#7kUnnK4D2+_0!)qC!rPH_gCaYOKyKStn8^{D90_4i+S(Co=&-H1v-PgN3m0d +zBxB;L%*-mCFZt_yQdm45YWmL2<-7I{6kRE%h!B0?%kZpR@V>C{a;D|H2`u;98CkG9 +z?~EooJK@|&W;I_kUmf333{*sIjQ}Q;j6%}nsD?}E2}L9~Zx`C3?P06oew40@4F^n$ +zP7@w(itv!{eZHfbVSYQ$Op|liTofAJBVScb219mIt*{4VNmlf_-PD)VE)40Ok +z9(_VL6gv{KU=XODULn07rtGoAwwC(Hxp7z&+;^czs8T=XFni?kRKGj3HCwFDausS(c+N&CewV!S%zKkR)mn2yf9PRC(R2q~>y +zdLu=~auhyVB*7G=_if~6vXSa;*CT0&?ZdKUY4a!}3Vm}jn>w`u9KGEsC61SwT?^n$ +z=~ZDK@6C-V!uu;F<%!R=NnyL5baXh=&&YwaQrR)unHFdi9r!Zs+xK=+)rND~I|$dU +zIsAl2l7Ri_E8S8=D)w(%WaZCIqCS3v7~KiO1cY(dgUx$6$ONbYKND~Fh8;S`blxva +zGBj|!gdTD>Tj_lXE+6nrAmX7ErErM?Sq5~yRcR5@0n#M8Dt6Pkx-E=EG5}BbLY`c{ +zCkHmAQuFYhj4Rl(4pwPT8n4ekFUfj$7Er>)5`*)_D{;)8Pq-vzI&^XC!cvW&LfyFg +z$$`o>td%TT>dPh>%O3m%`+F)U*1S&N5U?-hs&8~p1PgxqJwL$^!P%bqp+2|HO*SII +zXvY@28Y(KPiwVYx**0EL)Y)Q$MWYZ4_vU8{%*t|slC#h_v$(G-a+ssLVL}i)M^32w +z)07)etQS|Gp0<3IMPI-UI{B%#EA*_jr$lRpP#7GAKc9o7>&KVacDya8EKB^`ydigHs5s-d%;jxo+JZ +z5a8tX*9vFzs$bL*DM|D*TodBFSD?|=S8_&nBVD%p1ICQ5Pu5O0tf%vLIVJwuA~Ky{s&s&gIQ;rC-5bRBnhpcSEaLa?8c +zGs@@sAX^}h*dB@yl-edEaxY}An}M?C&cwLQ=AIPD`+RyV*FB5SpeQ*cIN$}bF&w>b +zJ{lG!Lfh1ypV*5@2;dh`jpBtX4)gFHVshTa+ndYvGH*R>zI0%yD-R}0EOK-yOk8Se +z+*pirXSEP%ZJWWWz*!jM3JiWf{};^%i`K56ASDP=f*>WxFD5~dS%#mEQ6TO7-
+z77SUipH33~l#}tV$tGlnAv+A&VZUJF4=F2jo!GsCa;_jJ3eR2=k^R +zlOw8lOZxBStkNau58GXG8hNbZbMxw~5_S?b)C;W%-m~j-$?(o3ZkifD4HiKs&Cgcd +z?#8Is8kR;8z|;@MIjYvmfVSJ-Gg?njKn9waTxd*^Rghrshq`IfnO!702Jhvq%nbxP!p?38}=tzral+MXpTCDZ=gko*UgA@G57Z3&0L4Nrw)rdFq$Bb$oz&h +z>IW(XCMCaSNqnkWFFFzc3zWps;JVjKJ3A-N+WuvOmVcEe|Cu)ye+VT1_SdTLv2LUz +z^Lrhcn@iy8FKOA|yd5+m9WCGeoPX9hk6mpQ68{ALlx0yfuwy7KE)}J|L%-;hFa5DZ +z{{nZF$nlWdqvG_S#ZjC&-BWXN2Nq~cBM-()YOcAy=c!GXr(08{<5fgUO-~^oJv+WMn-^R(nBVIgnsjw +zys-P@)I-`sCUI+lZ&M@bl7pkJ74107I-8-_>Vg4~FC1GSm!j}Xf-hx7a|2rj +zPiyB;N=E_@19Jxt+3UBOmb?lJir{H8{0Oegr<&7nyHl&WTUOmHO=ZJ5*hH6G4xMAZ +zU|TP)nnI_SzWa4!@w``U*+rCt(p;B6&@P}Cl(Y7!YuGm|Y&6^7rG*zn>H=PN`J!I> +z5o}D +zA&Q5A>bYPdO%31XIR{@M;nfb~C+BSlpvk~3JYHmif;FA0ca~#cxO5P&ML*jJre{o7 +z%UFv3?A6A8fb{vRCHnMjYCCpQYr@;JqAo{qnw8H5P%*K`^5UpbwP|xfUmXCHs-Lls +zE$-vSc${8rOAU+U4?-FMw~YHl^O!cRbJ6 +zQ=cfw%vPS>Tdv2Y(yadyh_7rux*xG+sk#G3hEBr#G +zrDA#)%c-MSwF;||mAdJA?K&$d8y83WKAKr +zHjBKXyQfOB!jrnZAYUlg*9Ne?;71yAVxl*-DF3dYmQPF~0oR*S?D+*aa9I~kXrJ8g +z6?^R@wP$^ijX=A%X+(=W#B3w1c-vvb~Aneqsx9h0O7Z7z|eU0V5|T(rA|d$) +zSJWUm49Q`C?h+(qhao!** +Date: Wed, 27 Apr 2022 17:33:33 +0200 +Subject: blkid: add tests for FSLASTBLOCK tag + +Upstream: http://github.com/util-linux/util-linux/commit/800ed56f4 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Andrey Albershteyn +--- + misc-utils/blkid.c | 2 +- + tests/expected/blkid/low-probe-btrfs | 1 + + tests/expected/blkid/low-probe-ext2 | 1 + + tests/expected/blkid/low-probe-ext3 | 1 + + tests/expected/blkid/low-probe-jbd | 1 + + tests/expected/blkid/low-probe-xfs | 1 + + tests/expected/blkid/low-probe-xfs-v5 | 1 + + 7 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c +index 4f456be52..f2b190ce3 100644 +--- a/misc-utils/blkid.c ++++ b/misc-utils/blkid.c +@@ -893,7 +893,7 @@ int main(int argc, char **argv) + BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | + BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE | + BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION | +- BLKID_SUBLKS_FSSIZE); ++ BLKID_SUBLKS_FSSIZE | BLKID_SUBLKS_FSLASTBLOCK); + + + if (fltr_usage && +diff --git a/tests/expected/blkid/low-probe-btrfs b/tests/expected/blkid/low-probe-btrfs +index 509fac378..48649389a 100644 +--- a/tests/expected/blkid/low-probe-btrfs ++++ b/tests/expected/blkid/low-probe-btrfs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSLASTBLOCK=29440 + ID_FS_TYPE=btrfs + ID_FS_USAGE=filesystem + ID_FS_UUID=d4a78b72-55e4-4811-86a6-09af936d43f9 +diff --git a/tests/expected/blkid/low-probe-ext2 b/tests/expected/blkid/low-probe-ext2 +index 087da97a4..e236c6e8a 100644 +--- a/tests/expected/blkid/low-probe-ext2 ++++ b/tests/expected/blkid/low-probe-ext2 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSLASTBLOCK=100 + ID_FS_LABEL=test-ext2 + ID_FS_LABEL_ENC=test-ext2 + ID_FS_TYPE=ext2 +diff --git a/tests/expected/blkid/low-probe-ext3 b/tests/expected/blkid/low-probe-ext3 +index 8684884c1..164fefb7b 100644 +--- a/tests/expected/blkid/low-probe-ext3 ++++ b/tests/expected/blkid/low-probe-ext3 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSLASTBLOCK=2048 + ID_FS_LABEL=test-ext3 + ID_FS_LABEL_ENC=test-ext3 + ID_FS_SEC_TYPE=ext2 +diff --git a/tests/expected/blkid/low-probe-jbd b/tests/expected/blkid/low-probe-jbd +index c9f9f6b79..f5462a2a3 100644 +--- a/tests/expected/blkid/low-probe-jbd ++++ b/tests/expected/blkid/low-probe-jbd +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSLASTBLOCK=1024 + ID_FS_LOGUUID=0d7a07df-7b06-4829-bce7-3b9c3ece570c + ID_FS_TYPE=jbd + ID_FS_USAGE=other +diff --git a/tests/expected/blkid/low-probe-xfs b/tests/expected/blkid/low-probe-xfs +index a91e92bcc..be9c4194a 100644 +--- a/tests/expected/blkid/low-probe-xfs ++++ b/tests/expected/blkid/low-probe-xfs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSLASTBLOCK=4096 + ID_FS_FSSIZE=11862016 + ID_FS_LABEL=test-xfs + ID_FS_LABEL_ENC=test-xfs +diff --git a/tests/expected/blkid/low-probe-xfs-v5 b/tests/expected/blkid/low-probe-xfs-v5 +index 129b41f26..fd2cba933 100644 +--- a/tests/expected/blkid/low-probe-xfs-v5 ++++ b/tests/expected/blkid/low-probe-xfs-v5 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSLASTBLOCK=5120 + ID_FS_FSSIZE=17469440 + ID_FS_LABEL=test-xfs-v5 + ID_FS_LABEL_ENC=test-xfs-v5 +-- +2.36.1 + diff --git a/SOURCES/0028-libblkid-merge-FS-flags-into-one-FSINFO.patch b/SOURCES/0028-libblkid-merge-FS-flags-into-one-FSINFO.patch new file mode 100644 index 0000000..7ab6004 --- /dev/null +++ b/SOURCES/0028-libblkid-merge-FS-flags-into-one-FSINFO.patch @@ -0,0 +1,120 @@ +From f58a63a3d88cccd5fdf53ead425c5e8186f32cc1 Mon Sep 17 00:00:00 2001 +From: Andrey Albershteyn +Date: Mon, 2 May 2022 17:08:33 +0200 +Subject: libblkid: merge FS* flags into one FSINFO + +Put BLOCK_SIZE, FSSIZE and FSLASTBLOCK tags under one FSINFO flag. +These, and probably future ones, are read directly from the +superblock (with minor post-processing). These properties are +combined under one flag to escape adding a flag per superblock +member. + +Upstream: http://github.com/util-linux/util-linux/commit/c9b2297eb +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Andrey Albershteyn +--- + libblkid/samples/superblocks.c | 3 +-- + libblkid/src/blkid.h.in | 23 +++++++++++------------ + libblkid/src/superblocks/superblocks.c | 9 +++++++-- + misc-utils/blkid.c | 3 +-- + 4 files changed, 20 insertions(+), 18 deletions(-) + +diff --git a/libblkid/samples/superblocks.c b/libblkid/samples/superblocks.c +index b7f94ec14..5253f9cc4 100644 +--- a/libblkid/samples/superblocks.c ++++ b/libblkid/samples/superblocks.c +@@ -44,8 +44,7 @@ int main(int argc, char *argv[]) + BLKID_SUBLKS_UUID | BLKID_SUBLKS_UUIDRAW | + BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE | + BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION | +- BLKID_SUBLKS_MAGIC | BLKID_SUBLKS_FSSIZE | +- BLKID_SUBLKS_FSLASTBLOCK); ++ BLKID_SUBLKS_MAGIC | BLKID_SUBLKS_FSINFO); + + rc = blkid_do_safeprobe(pr); + if (rc == -1) +diff --git a/libblkid/src/blkid.h.in b/libblkid/src/blkid.h.in +index 56e64f9ab..ae4e555e3 100644 +--- a/libblkid/src/blkid.h.in ++++ b/libblkid/src/blkid.h.in +@@ -271,18 +271,17 @@ extern int blkid_superblocks_get_name(size_t idx, const char **name, int *usage) + extern int blkid_probe_enable_superblocks(blkid_probe pr, int enable) + __ul_attribute__((nonnull)); + +-#define BLKID_SUBLKS_LABEL (1 << 1) /* read LABEL from superblock */ +-#define BLKID_SUBLKS_LABELRAW (1 << 2) /* read and define LABEL_RAW result value*/ +-#define BLKID_SUBLKS_UUID (1 << 3) /* read UUID from superblock */ +-#define BLKID_SUBLKS_UUIDRAW (1 << 4) /* read and define UUID_RAW result value */ +-#define BLKID_SUBLKS_TYPE (1 << 5) /* define TYPE result value */ +-#define BLKID_SUBLKS_SECTYPE (1 << 6) /* define compatible fs type (second type) */ +-#define BLKID_SUBLKS_USAGE (1 << 7) /* define USAGE result value */ +-#define BLKID_SUBLKS_VERSION (1 << 8) /* read FS type from superblock */ +-#define BLKID_SUBLKS_MAGIC (1 << 9) /* define SBMAGIC and SBMAGIC_OFFSET */ +-#define BLKID_SUBLKS_BADCSUM (1 << 10) /* allow a bad checksum */ +-#define BLKID_SUBLKS_FSSIZE (1 << 11) /* read and define FSSIZE from superblock */ +-#define BLKID_SUBLKS_FSLASTBLOCK (1 << 12) /* read and define FSLASTBLOCK from superblock */ ++#define BLKID_SUBLKS_LABEL (1 << 1) /* read LABEL from superblock */ ++#define BLKID_SUBLKS_LABELRAW (1 << 2) /* read and define LABEL_RAW result value*/ ++#define BLKID_SUBLKS_UUID (1 << 3) /* read UUID from superblock */ ++#define BLKID_SUBLKS_UUIDRAW (1 << 4) /* read and define UUID_RAW result value */ ++#define BLKID_SUBLKS_TYPE (1 << 5) /* define TYPE result value */ ++#define BLKID_SUBLKS_SECTYPE (1 << 6) /* define compatible fs type (second type) */ ++#define BLKID_SUBLKS_USAGE (1 << 7) /* define USAGE result value */ ++#define BLKID_SUBLKS_VERSION (1 << 8) /* read FS type from superblock */ ++#define BLKID_SUBLKS_MAGIC (1 << 9) /* define SBMAGIC and SBMAGIC_OFFSET */ ++#define BLKID_SUBLKS_BADCSUM (1 << 10) /* allow a bad checksum */ ++#define BLKID_SUBLKS_FSINFO (1 << 11) /* read and define fs properties from superblock */ + + #define BLKID_SUBLKS_DEFAULT (BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | \ + BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE) +diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c +index 5b899a830..a1f42c611 100644 +--- a/libblkid/src/superblocks/superblocks.c ++++ b/libblkid/src/superblocks/superblocks.c +@@ -562,6 +562,11 @@ int blkid_probe_sprintf_version(blkid_probe pr, const char *fmt, ...) + + int blkid_probe_set_block_size(blkid_probe pr, unsigned block_size) + { ++ struct blkid_chain *chn = blkid_probe_get_chain(pr); ++ ++ if (!(chn->flags & BLKID_SUBLKS_FSINFO)) ++ return 0; ++ + return blkid_probe_sprintf_value(pr, "BLOCK_SIZE", "%u", block_size); + } + +@@ -591,7 +596,7 @@ int blkid_probe_set_fssize(blkid_probe pr, uint64_t size) + { + struct blkid_chain *chn = blkid_probe_get_chain(pr); + +- if (!(chn->flags & BLKID_SUBLKS_FSSIZE)) ++ if (!(chn->flags & BLKID_SUBLKS_FSINFO)) + return 0; + + return blkid_probe_sprintf_value(pr, "FSSIZE", "%" PRIu64, size); +@@ -601,7 +606,7 @@ int blkid_probe_set_fslastblock(blkid_probe pr, uint64_t lastblock) + { + struct blkid_chain *chn = blkid_probe_get_chain(pr); + +- if (!(chn->flags & BLKID_SUBLKS_FSLASTBLOCK)) ++ if (!(chn->flags & BLKID_SUBLKS_FSINFO)) + return 0; + + return blkid_probe_sprintf_value(pr, "FSLASTBLOCK", "%" PRIu64, +diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c +index f2b190ce3..744151616 100644 +--- a/misc-utils/blkid.c ++++ b/misc-utils/blkid.c +@@ -893,8 +893,7 @@ int main(int argc, char **argv) + BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | + BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE | + BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION | +- BLKID_SUBLKS_FSSIZE | BLKID_SUBLKS_FSLASTBLOCK); +- ++ BLKID_SUBLKS_FSINFO); + + if (fltr_usage && + blkid_probe_filter_superblocks_usage(pr, fltr_flag, fltr_usage)) +-- +2.36.1 + diff --git a/SOURCES/0029-libblkid-add-FSBLOCKSIZE-tag.patch b/SOURCES/0029-libblkid-add-FSBLOCKSIZE-tag.patch new file mode 100644 index 0000000..8016476 --- /dev/null +++ b/SOURCES/0029-libblkid-add-FSBLOCKSIZE-tag.patch @@ -0,0 +1,1394 @@ +From bb1537a959e8ec53acfa90081be9cd1167b6a0cd Mon Sep 17 00:00:00 2001 +From: Andrey Albershteyn +Date: Fri, 27 May 2022 12:05:32 +0200 +Subject: libblkid: add FSBLOCKSIZE tag + +The FSBLOCKSIZE tag exposes file system block size in contrast to +the BLOCK_SIZE (unfortunate name) which returns minimal accessible +block size (sector size). + +Upstream: http://github.com/util-linux/util-linux/commit/0f447d490 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Andrey Albershteyn +--- + libblkid/src/superblocks/apfs.c | 1 + + libblkid/src/superblocks/befs.c | 1 + + libblkid/src/superblocks/btrfs.c | 1 + + libblkid/src/superblocks/erofs.c | 5 ++++- + libblkid/src/superblocks/exfat.c | 1 + + libblkid/src/superblocks/exfs.c | 1 + + libblkid/src/superblocks/ext.c | 4 +++- + libblkid/src/superblocks/f2fs.c | 4 +++- + libblkid/src/superblocks/gfs.c | 1 + + libblkid/src/superblocks/hfs.c | 1 + + libblkid/src/superblocks/hpfs.c | 1 + + libblkid/src/superblocks/iso9660.c | 2 ++ + libblkid/src/superblocks/jfs.c | 1 + + libblkid/src/superblocks/minix.c | 1 + + libblkid/src/superblocks/nilfs.c | 4 +++- + libblkid/src/superblocks/ntfs.c | 2 ++ + libblkid/src/superblocks/ocfs.c | 4 +++- + libblkid/src/superblocks/reiserfs.c | 2 ++ + libblkid/src/superblocks/romfs.c | 1 + + libblkid/src/superblocks/squashfs.c | 1 + + libblkid/src/superblocks/superblocks.c | 13 +++++++++++++ + libblkid/src/superblocks/superblocks.h | 1 + + libblkid/src/superblocks/udf.c | 1 + + libblkid/src/superblocks/ufs.c | 8 ++++++-- + libblkid/src/superblocks/vfat.c | 1 + + libblkid/src/superblocks/vxfs.c | 2 ++ + libblkid/src/superblocks/xfs.c | 1 + + libblkid/src/superblocks/zfs.c | 4 +++- + libblkid/src/superblocks/zonefs.c | 1 + + tests/expected/blkid/low-probe-befs | 1 + + tests/expected/blkid/low-probe-btrfs | 1 + + tests/expected/blkid/low-probe-erofs | 1 + + tests/expected/blkid/low-probe-exfat | 1 + + tests/expected/blkid/low-probe-ext2 | 1 + + tests/expected/blkid/low-probe-ext3 | 1 + + tests/expected/blkid/low-probe-f2fs | 1 + + tests/expected/blkid/low-probe-fat | 1 + + tests/expected/blkid/low-probe-fat16_noheads | 1 + + tests/expected/blkid/low-probe-fat32_cp850_O_tilde | 1 + + tests/expected/blkid/low-probe-fat32_label_64MB | 1 + + tests/expected/blkid/low-probe-fat32_mkdosfs_label1 | 1 + + ...ow-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME | 1 + + .../low-probe-fat32_mkdosfs_label1_dosfslabel_empty | 1 + + ...low-probe-fat32_mkdosfs_label1_dosfslabel_label2 | 1 + + .../low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME | 1 + + .../low-probe-fat32_mkdosfs_label1_mlabel_erase | 1 + + .../blkid/low-probe-fat32_mkdosfs_label1_xp_erase | 1 + + .../blkid/low-probe-fat32_mkdosfs_label1_xp_label2 | 1 + + tests/expected/blkid/low-probe-fat32_mkdosfs_none | 1 + + .../low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME | 1 + + .../low-probe-fat32_mkdosfs_none_dosfslabel_label1 | 1 + + ...e-fat32_mkdosfs_none_dosfslabel_label1_xp_label2 | 1 + + .../blkid/low-probe-fat32_mkdosfs_none_xp_label1 | 1 + + ...e-fat32_mkdosfs_none_xp_label1_dosfslabel_label2 | 1 + + tests/expected/blkid/low-probe-fat32_xp_label1 | 1 + + tests/expected/blkid/low-probe-fat32_xp_none | 1 + + .../blkid/low-probe-fat32_xp_none_dosfslabel_label1 | 1 + + .../blkid/low-probe-fat32_xp_none_mlabel_label1 | 1 + + tests/expected/blkid/low-probe-gfs2 | 1 + + tests/expected/blkid/low-probe-hfsplus | 1 + + tests/expected/blkid/low-probe-hpfs | 1 + + tests/expected/blkid/low-probe-iso | 1 + + .../blkid/low-probe-iso-different-iso-joliet-label | 1 + + tests/expected/blkid/low-probe-iso-joliet | 1 + + .../blkid/low-probe-iso-multi-genisoimage-0 | 1 + + .../blkid/low-probe-iso-multi-genisoimage-174 | 1 + + .../blkid/low-probe-iso-multi-genisoimage-348 | 1 + + tests/expected/blkid/low-probe-iso-rr-joliet | 1 + + .../expected/blkid/low-probe-iso-unicode-long-label | 1 + + tests/expected/blkid/low-probe-jbd | 1 + + tests/expected/blkid/low-probe-jfs | 1 + + tests/expected/blkid/low-probe-minix-BE | 1 + + tests/expected/blkid/low-probe-minix-LE | 1 + + tests/expected/blkid/low-probe-nilfs2 | 1 + + tests/expected/blkid/low-probe-ntfs | 1 + + tests/expected/blkid/low-probe-ocfs2 | 1 + + tests/expected/blkid/low-probe-reiser3 | 1 + + tests/expected/blkid/low-probe-reiser4 | 1 + + tests/expected/blkid/low-probe-romfs | 1 + + tests/expected/blkid/low-probe-small-fat32 | 1 + + tests/expected/blkid/low-probe-udf | 1 + + tests/expected/blkid/low-probe-udf-bdr-2.60-nero | 1 + + .../blkid/low-probe-udf-cd-mkudfiso-20100208 | 1 + + tests/expected/blkid/low-probe-udf-cd-nero-6 | 1 + + .../blkid/low-probe-udf-hdd-macosx-2.60-4096 | 1 + + .../blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 | 1 + + .../blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 | 1 + + .../expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 | 1 + + .../expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 | 1 + + .../expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 | 1 + + .../expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 | 1 + + .../expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 | 1 + + .../expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 | 1 + + .../expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 | 1 + + .../expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 | 1 + + tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 | 1 + + .../blkid/low-probe-udf-hdd-udfclient-0.7.5 | 1 + + .../blkid/low-probe-udf-hdd-udfclient-0.7.7 | 1 + + tests/expected/blkid/low-probe-udf-hdd-win7 | 1 + + .../blkid/low-probe-udf-multi-genisoimage-0 | 1 + + .../blkid/low-probe-udf-multi-genisoimage-417 | 1 + + .../blkid/low-probe-udf-multi-genisoimage-834 | 1 + + tests/expected/blkid/low-probe-udf-multi-mkudffs-0 | 1 + + .../expected/blkid/low-probe-udf-multi-mkudffs-320 | 1 + + .../expected/blkid/low-probe-udf-multi-mkudffs-640 | 1 + + tests/expected/blkid/low-probe-ufs | 1 + + tests/expected/blkid/low-probe-xfs | 1 + + tests/expected/blkid/low-probe-xfs-v5 | 1 + + tests/expected/blkid/low-probe-zfs | 1 + + tests/expected/blkid/low-probe-zonefs | 1 + + 110 files changed, 144 insertions(+), 8 deletions(-) + +diff --git a/libblkid/src/superblocks/apfs.c b/libblkid/src/superblocks/apfs.c +index 3332ef228..048423a8b 100644 +--- a/libblkid/src/superblocks/apfs.c ++++ b/libblkid/src/superblocks/apfs.c +@@ -65,6 +65,7 @@ static int probe_apfs(blkid_probe pr, const struct blkid_idmag *mag) + if (blkid_probe_set_uuid(pr, sb->uuid) < 0) + return BLKID_PROBE_NONE; + ++ blkid_probe_set_fsblocksize(pr, le32_to_cpu(sb->block_size)); + blkid_probe_set_block_size(pr, le32_to_cpu(sb->block_size)); + + return BLKID_PROBE_OK; +diff --git a/libblkid/src/superblocks/befs.c b/libblkid/src/superblocks/befs.c +index 211feae9f..1ba0e10ae 100644 +--- a/libblkid/src/superblocks/befs.c ++++ b/libblkid/src/superblocks/befs.c +@@ -521,6 +521,7 @@ static int probe_befs(blkid_probe pr, const struct blkid_idmag *mag) + sizeof(volume_id), "%016" PRIx64, + FS64_TO_CPU(volume_id, fs_le)); + ++ blkid_probe_set_fsblocksize(pr, block_size); + blkid_probe_set_block_size(pr, block_size); + + return BLKID_PROBE_OK; +diff --git a/libblkid/src/superblocks/btrfs.c b/libblkid/src/superblocks/btrfs.c +index 9708f2e28..06a27529a 100644 +--- a/libblkid/src/superblocks/btrfs.c ++++ b/libblkid/src/superblocks/btrfs.c +@@ -74,6 +74,7 @@ static int probe_btrfs(blkid_probe pr, const struct blkid_idmag *mag) + + blkid_probe_set_uuid(pr, bfs->fsid); + blkid_probe_set_uuid_as(pr, bfs->dev_item.uuid, "UUID_SUB"); ++ blkid_probe_set_fsblocksize(pr, le32_to_cpu(bfs->sectorsize)); + blkid_probe_set_block_size(pr, le32_to_cpu(bfs->sectorsize)); + + uint32_t sectorsize_log = 31 - +diff --git a/libblkid/src/superblocks/erofs.c b/libblkid/src/superblocks/erofs.c +index 0e7b4223d..30914a89c 100644 +--- a/libblkid/src/superblocks/erofs.c ++++ b/libblkid/src/superblocks/erofs.c +@@ -51,8 +51,11 @@ static int probe_erofs(blkid_probe pr, const struct blkid_idmag *mag) + + blkid_probe_set_uuid(pr, sb->uuid); + +- if (sb->blkszbits < 32) ++ if (sb->blkszbits < 32){ ++ blkid_probe_set_fsblocksize(pr, 1U << sb->blkszbits); + blkid_probe_set_block_size(pr, 1U << sb->blkszbits); ++ } ++ + return BLKID_PROBE_OK; + } + +diff --git a/libblkid/src/superblocks/exfat.c b/libblkid/src/superblocks/exfat.c +index f586ec786..fd2b85655 100644 +--- a/libblkid/src/superblocks/exfat.c ++++ b/libblkid/src/superblocks/exfat.c +@@ -139,6 +139,7 @@ static int probe_exfat(blkid_probe pr, const struct blkid_idmag *mag) + blkid_probe_sprintf_version(pr, "%u.%u", + sb->version.vermaj, sb->version.vermin); + ++ blkid_probe_set_fsblocksize(pr, BLOCK_SIZE(sb)); + blkid_probe_set_block_size(pr, BLOCK_SIZE(sb)); + + return BLKID_PROBE_OK; +diff --git a/libblkid/src/superblocks/exfs.c b/libblkid/src/superblocks/exfs.c +index e0eafafc6..87dc0a0c7 100644 +--- a/libblkid/src/superblocks/exfs.c ++++ b/libblkid/src/superblocks/exfs.c +@@ -173,6 +173,7 @@ static int probe_exfs(blkid_probe pr, const struct blkid_idmag *mag) + + blkid_probe_set_uuid(pr, xs->sb_uuid); + ++ blkid_probe_set_fsblocksize(pr, be32_to_cpu(xs->sb_blocksize)); + blkid_probe_set_block_size(pr, be32_to_cpu(xs->sb_blocksize)); + + return 0; +diff --git a/libblkid/src/superblocks/ext.c b/libblkid/src/superblocks/ext.c +index 0b9023734..cbbe8eb96 100644 +--- a/libblkid/src/superblocks/ext.c ++++ b/libblkid/src/superblocks/ext.c +@@ -189,8 +189,10 @@ static void ext_get_info(blkid_probe pr, int ver, struct ext2_super_block *es) + le32_to_cpu(es->s_rev_level), + le16_to_cpu(es->s_minor_rev_level)); + +- if (le32_to_cpu(es->s_log_block_size) < 32) ++ if (le32_to_cpu(es->s_log_block_size) < 32){ ++ blkid_probe_set_fsblocksize(pr, 1024U << le32_to_cpu(es->s_log_block_size)); + blkid_probe_set_block_size(pr, 1024U << le32_to_cpu(es->s_log_block_size)); ++ } + + uint64_t fslastblock = le32_to_cpu(es->s_blocks_count) | + ((s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) ? +diff --git a/libblkid/src/superblocks/f2fs.c b/libblkid/src/superblocks/f2fs.c +index aed93e25b..f271e8047 100644 +--- a/libblkid/src/superblocks/f2fs.c ++++ b/libblkid/src/superblocks/f2fs.c +@@ -78,8 +78,10 @@ static int probe_f2fs(blkid_probe pr, const struct blkid_idmag *mag) + + blkid_probe_set_uuid(pr, sb->uuid); + blkid_probe_sprintf_version(pr, "%u.%u", vermaj, vermin); +- if (le32_to_cpu(sb->log_blocksize) < 32) ++ if (le32_to_cpu(sb->log_blocksize) < 32){ ++ blkid_probe_set_fsblocksize(pr, 1U << le32_to_cpu(sb->log_blocksize)); + blkid_probe_set_block_size(pr, 1U << le32_to_cpu(sb->log_blocksize)); ++ } + return 0; + } + +diff --git a/libblkid/src/superblocks/gfs.c b/libblkid/src/superblocks/gfs.c +index 37a74b157..445c0dafa 100644 +--- a/libblkid/src/superblocks/gfs.c ++++ b/libblkid/src/superblocks/gfs.c +@@ -106,6 +106,7 @@ static int probe_gfs2(blkid_probe pr, const struct blkid_idmag *mag) + sizeof(sbd->sb_locktable)); + blkid_probe_set_uuid(pr, sbd->sb_uuid); + blkid_probe_set_version(pr, "1"); ++ blkid_probe_set_fsblocksize(pr, be32_to_cpu(sbd->sb_bsize)); + blkid_probe_set_block_size(pr, be32_to_cpu(sbd->sb_bsize)); + return 0; + } +diff --git a/libblkid/src/superblocks/hfs.c b/libblkid/src/superblocks/hfs.c +index ebf90e49e..9674b1481 100644 +--- a/libblkid/src/superblocks/hfs.c ++++ b/libblkid/src/superblocks/hfs.c +@@ -241,6 +241,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) + if (blocksize < HFSPLUS_SECTOR_SIZE) + return 1; + ++ blkid_probe_set_fsblocksize(pr, blocksize); + blkid_probe_set_block_size(pr, blocksize); + + memcpy(extents, hfsplus->cat_file.extents, sizeof(extents)); +diff --git a/libblkid/src/superblocks/hpfs.c b/libblkid/src/superblocks/hpfs.c +index dcf4520b6..09bf975ea 100644 +--- a/libblkid/src/superblocks/hpfs.c ++++ b/libblkid/src/superblocks/hpfs.c +@@ -99,6 +99,7 @@ static int probe_hpfs(blkid_probe pr, const struct blkid_idmag *mag) + hbb->vol_serno[1], hbb->vol_serno[0]); + } + blkid_probe_sprintf_version(pr, "%u", version); ++ blkid_probe_set_fsblocksize(pr, 512); + blkid_probe_set_block_size(pr, 512); + + return 0; +diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c +index 289a325c8..503126c00 100644 +--- a/libblkid/src/superblocks/iso9660.c ++++ b/libblkid/src/superblocks/iso9660.c +@@ -90,6 +90,7 @@ static int probe_iso9660_hsfs(blkid_probe pr, const struct blkid_idmag *mag) + if (!iso) + return errno ? -errno : 1; + ++ blkid_probe_set_fsblocksize(pr, ISO_SECTOR_SIZE); + blkid_probe_set_block_size(pr, ISO_SECTOR_SIZE); + blkid_probe_set_version(pr, "High Sierra"); + blkid_probe_set_label(pr, iso->volume_id, sizeof(iso->volume_id)); +@@ -249,6 +250,7 @@ static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) + if (!pvd) + return errno ? -errno : 1; + ++ blkid_probe_set_fsblocksize(pr, ISO_SECTOR_SIZE); + blkid_probe_set_block_size(pr, ISO_SECTOR_SIZE); + + if (joliet && (len = merge_utf16be_ascii(buf, joliet->system_id, pvd->system_id, sizeof(pvd->system_id))) != 0) +diff --git a/libblkid/src/superblocks/jfs.c b/libblkid/src/superblocks/jfs.c +index 3de8c2e3d..e22467246 100644 +--- a/libblkid/src/superblocks/jfs.c ++++ b/libblkid/src/superblocks/jfs.c +@@ -52,6 +52,7 @@ static int probe_jfs(blkid_probe pr, const struct blkid_idmag *mag) + if (*((char *) js->js_label) != '\0') + blkid_probe_set_label(pr, js->js_label, sizeof(js->js_label)); + blkid_probe_set_uuid(pr, js->js_uuid); ++ blkid_probe_set_fsblocksize(pr, le32_to_cpu(js->js_bsize)); + blkid_probe_set_block_size(pr, le32_to_cpu(js->js_bsize)); + return 0; + } +diff --git a/libblkid/src/superblocks/minix.c b/libblkid/src/superblocks/minix.c +index b521efb2b..6011842f7 100644 +--- a/libblkid/src/superblocks/minix.c ++++ b/libblkid/src/superblocks/minix.c +@@ -148,6 +148,7 @@ static int probe_minix(blkid_probe pr, + return 1; + + blkid_probe_sprintf_version(pr, "%d", version); ++ blkid_probe_set_fsblocksize(pr, block_size); + blkid_probe_set_block_size(pr, block_size); + return 0; + } +diff --git a/libblkid/src/superblocks/nilfs.c b/libblkid/src/superblocks/nilfs.c +index 423bd1ac4..ca7574a52 100644 +--- a/libblkid/src/superblocks/nilfs.c ++++ b/libblkid/src/superblocks/nilfs.c +@@ -157,8 +157,10 @@ static int probe_nilfs2(blkid_probe pr, + (unsigned char *) &sb->s_magic)) + return 1; + +- if (le32_to_cpu(sb->s_log_block_size) < 32) ++ if (le32_to_cpu(sb->s_log_block_size) < 32){ ++ blkid_probe_set_fsblocksize(pr, 1024U << le32_to_cpu(sb->s_log_block_size)); + blkid_probe_set_block_size(pr, 1024U << le32_to_cpu(sb->s_log_block_size)); ++ } + + return 0; + } +diff --git a/libblkid/src/superblocks/ntfs.c b/libblkid/src/superblocks/ntfs.c +index be2e3d895..9f1927cf7 100644 +--- a/libblkid/src/superblocks/ntfs.c ++++ b/libblkid/src/superblocks/ntfs.c +@@ -208,6 +208,8 @@ static int __probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag, int save_ + attr_off += attr_len; + } + ++ ++ blkid_probe_set_fsblocksize(pr, sector_size * sectors_per_cluster); + blkid_probe_set_block_size(pr, sector_size); + + blkid_probe_sprintf_uuid(pr, +diff --git a/libblkid/src/superblocks/ocfs.c b/libblkid/src/superblocks/ocfs.c +index 463ed7bcf..28df6ddfa 100644 +--- a/libblkid/src/superblocks/ocfs.c ++++ b/libblkid/src/superblocks/ocfs.c +@@ -153,8 +153,10 @@ static int probe_ocfs2(blkid_probe pr, const struct blkid_idmag *mag) + le16_to_cpu(osb->s_major_rev_level), + le16_to_cpu(osb->s_minor_rev_level)); + +- if (le32_to_cpu(osb->s_blocksize_bits) < 32) ++ if (le32_to_cpu(osb->s_blocksize_bits) < 32){ ++ blkid_probe_set_fsblocksize(pr, 1U << le32_to_cpu(osb->s_blocksize_bits)); + blkid_probe_set_block_size(pr, 1U << le32_to_cpu(osb->s_blocksize_bits)); ++ } + + return 0; + } +diff --git a/libblkid/src/superblocks/reiserfs.c b/libblkid/src/superblocks/reiserfs.c +index 6c5e5b0d7..23d10e2e2 100644 +--- a/libblkid/src/superblocks/reiserfs.c ++++ b/libblkid/src/superblocks/reiserfs.c +@@ -74,6 +74,7 @@ static int probe_reiser(blkid_probe pr, const struct blkid_idmag *mag) + else + blkid_probe_set_version(pr, "3.5"); + ++ blkid_probe_set_fsblocksize(pr, blocksize); + blkid_probe_set_block_size(pr, blocksize); + + return 0; +@@ -95,6 +96,7 @@ static int probe_reiser4(blkid_probe pr, const struct blkid_idmag *mag) + blkid_probe_set_uuid(pr, rs4->rs4_uuid); + blkid_probe_set_version(pr, "4"); + ++ blkid_probe_set_fsblocksize(pr, blocksize); + blkid_probe_set_block_size(pr, blocksize); + + return 0; +diff --git a/libblkid/src/superblocks/romfs.c b/libblkid/src/superblocks/romfs.c +index 1c2ac4315..8db88775b 100644 +--- a/libblkid/src/superblocks/romfs.c ++++ b/libblkid/src/superblocks/romfs.c +@@ -35,6 +35,7 @@ static int probe_romfs(blkid_probe pr, const struct blkid_idmag *mag) + blkid_probe_set_label(pr, ros->ros_volume, + sizeof(ros->ros_volume)); + ++ blkid_probe_set_fsblocksize(pr, 1024); + blkid_probe_set_block_size(pr, 1024); + + return 0; +diff --git a/libblkid/src/superblocks/squashfs.c b/libblkid/src/superblocks/squashfs.c +index 4db842493..d85ff8f1a 100644 +--- a/libblkid/src/superblocks/squashfs.c ++++ b/libblkid/src/superblocks/squashfs.c +@@ -71,6 +71,7 @@ static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) + + blkid_probe_sprintf_version(pr, "%u.%u", vermaj, vermin); + ++ blkid_probe_set_fsblocksize(pr, 1024); + blkid_probe_set_block_size(pr, 1024); + + return 0; +diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c +index a1f42c611..9cfa991fc 100644 +--- a/libblkid/src/superblocks/superblocks.c ++++ b/libblkid/src/superblocks/superblocks.c +@@ -70,6 +70,8 @@ + * + * @FSLASTBLOCK: last fsblock/total number of fsblocks + * ++ * @FSBLOCKSIZE: file system block size ++ * + * @SYSTEM_ID: ISO9660 system identifier + * + * @PUBLISHER_ID: ISO9660 publisher identifier +@@ -613,6 +615,17 @@ int blkid_probe_set_fslastblock(blkid_probe pr, uint64_t lastblock) + lastblock); + } + ++int blkid_probe_set_fsblocksize(blkid_probe pr, uint32_t block_size) ++{ ++ struct blkid_chain *chn = blkid_probe_get_chain(pr); ++ ++ if (!(chn->flags & BLKID_SUBLKS_FSINFO)) ++ return 0; ++ ++ return blkid_probe_sprintf_value(pr, "FSBLOCKSIZE", "%" PRIu32, ++ block_size); ++} ++ + int blkid_probe_set_id_label(blkid_probe pr, const char *name, + const unsigned char *data, size_t len) + { +diff --git a/libblkid/src/superblocks/superblocks.h b/libblkid/src/superblocks/superblocks.h +index 251e2e386..8a1b85dda 100644 +--- a/libblkid/src/superblocks/superblocks.h ++++ b/libblkid/src/superblocks/superblocks.h +@@ -113,6 +113,7 @@ extern int blkid_probe_set_utf8_id_label(blkid_probe pr, const char *name, + int blkid_probe_set_block_size(blkid_probe pr, unsigned block_size); + int blkid_probe_set_fssize(blkid_probe pr, uint64_t size); + int blkid_probe_set_fslastblock(blkid_probe pr, uint64_t lastblock); ++int blkid_probe_set_fsblocksize(blkid_probe pr, uint32_t block_size); + + extern int blkid_probe_is_bitlocker(blkid_probe pr); + extern int blkid_probe_is_ntfs(blkid_probe pr); +diff --git a/libblkid/src/superblocks/udf.c b/libblkid/src/superblocks/udf.c +index 9ed089ee4..36adf60f1 100644 +--- a/libblkid/src/superblocks/udf.c ++++ b/libblkid/src/superblocks/udf.c +@@ -569,6 +569,7 @@ real_blksz: + * E.g. number 0x0150 is revision 1.50, number 0x0201 is revision 2.01. */ + blkid_probe_sprintf_version(pr, "%x.%02x", (unsigned int)(udf_rev >> 8), (unsigned int)(udf_rev & 0xFF)); + ++ blkid_probe_set_fsblocksize(pr, bs); + blkid_probe_set_block_size(pr, bs); + + return 0; +diff --git a/libblkid/src/superblocks/ufs.c b/libblkid/src/superblocks/ufs.c +index 7a8396c1c..5da87b18f 100644 +--- a/libblkid/src/superblocks/ufs.c ++++ b/libblkid/src/superblocks/ufs.c +@@ -233,10 +233,14 @@ found: + (unsigned char *) &ufs->fs_magic)) + return 1; + ++ uint32_t bsize = 0; + if (!is_be) +- blkid_probe_set_block_size(pr, le32_to_cpu(ufs->fs_fsize)); ++ bsize = le32_to_cpu(ufs->fs_fsize); + else +- blkid_probe_set_block_size(pr, be32_to_cpu(ufs->fs_fsize)); ++ bsize = be32_to_cpu(ufs->fs_fsize); ++ ++ blkid_probe_set_fsblocksize(pr, bsize); ++ blkid_probe_set_block_size(pr, bsize); + + return 0; + } +diff --git a/libblkid/src/superblocks/vfat.c b/libblkid/src/superblocks/vfat.c +index 71813485a..6cd58cc71 100644 +--- a/libblkid/src/superblocks/vfat.c ++++ b/libblkid/src/superblocks/vfat.c +@@ -433,6 +433,7 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag) + if (version) + blkid_probe_set_version(pr, version); + ++ blkid_probe_set_fsblocksize(pr, vs->vs_cluster_size * sector_size); + blkid_probe_set_block_size(pr, sector_size); + + return 0; +diff --git a/libblkid/src/superblocks/vxfs.c b/libblkid/src/superblocks/vxfs.c +index d9d26adcf..0f3c07b0c 100644 +--- a/libblkid/src/superblocks/vxfs.c ++++ b/libblkid/src/superblocks/vxfs.c +@@ -33,9 +33,11 @@ static int probe_vxfs(blkid_probe pr, const struct blkid_idmag *mag) + + if (le32_to_cpu(vxs->vs_magic) == 0xa501fcf5) { + blkid_probe_sprintf_version(pr, "%u", (unsigned int)le32_to_cpu(vxs->vs_version)); ++ blkid_probe_set_fsblocksize(pr, le32_to_cpu(vxs->vs_bsize)); + blkid_probe_set_block_size(pr, le32_to_cpu(vxs->vs_bsize)); + } else if (be32_to_cpu(vxs->vs_magic) == 0xa501fcf5) { + blkid_probe_sprintf_version(pr, "%u", (unsigned int)be32_to_cpu(vxs->vs_version)); ++ blkid_probe_set_fsblocksize(pr, be32_to_cpu(vxs->vs_bsize)); + blkid_probe_set_block_size(pr, be32_to_cpu(vxs->vs_bsize)); + } + return 0; +diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c +index 1f2e92cac..2cc6f6179 100644 +--- a/libblkid/src/superblocks/xfs.c ++++ b/libblkid/src/superblocks/xfs.c +@@ -184,6 +184,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) + blkid_probe_set_uuid(pr, xs->sb_uuid); + blkid_probe_set_fssize(pr, xfs_fssize(xs)); + blkid_probe_set_fslastblock(pr, be64_to_cpu(xs->sb_dblocks)); ++ blkid_probe_set_fsblocksize(pr, be32_to_cpu(xs->sb_blocksize)); + blkid_probe_set_block_size(pr, be16_to_cpu(xs->sb_sectsize)); + return 0; + } +diff --git a/libblkid/src/superblocks/zfs.c b/libblkid/src/superblocks/zfs.c +index 774a199e1..e7ca78c0d 100644 +--- a/libblkid/src/superblocks/zfs.c ++++ b/libblkid/src/superblocks/zfs.c +@@ -138,8 +138,10 @@ static void zfs_process_value(blkid_probe pr, char *name, size_t namelen, + if (nvu_type != DATA_TYPE_UINT64) + return; + +- if (nvu_value < 32) ++ if (nvu_value < 32){ ++ blkid_probe_set_fsblocksize(pr, 1U << nvu_value); + blkid_probe_set_block_size(pr, 1U << nvu_value); ++ } + } + } + +diff --git a/libblkid/src/superblocks/zonefs.c b/libblkid/src/superblocks/zonefs.c +index 4c826ec76..2cb7097d4 100644 +--- a/libblkid/src/superblocks/zonefs.c ++++ b/libblkid/src/superblocks/zonefs.c +@@ -64,6 +64,7 @@ static int probe_zonefs(blkid_probe pr, + sizeof(sb->s_label)); + + blkid_probe_set_uuid(pr, sb->s_uuid); ++ blkid_probe_set_fsblocksize(pr, ZONEFS_BLOCK_SIZE); + blkid_probe_set_block_size(pr, ZONEFS_BLOCK_SIZE); + + return 0; +diff --git a/tests/expected/blkid/low-probe-befs b/tests/expected/blkid/low-probe-befs +index 5717049d2..738114769 100644 +--- a/tests/expected/blkid/low-probe-befs ++++ b/tests/expected/blkid/low-probe-befs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSBLOCKSIZE=1024 + ID_FS_LABEL=befs_test + ID_FS_LABEL_ENC=befs_test + ID_FS_TYPE=befs +diff --git a/tests/expected/blkid/low-probe-btrfs b/tests/expected/blkid/low-probe-btrfs +index 48649389a..a626bc1f6 100644 +--- a/tests/expected/blkid/low-probe-btrfs ++++ b/tests/expected/blkid/low-probe-btrfs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_FSLASTBLOCK=29440 + ID_FS_TYPE=btrfs + ID_FS_USAGE=filesystem +diff --git a/tests/expected/blkid/low-probe-erofs b/tests/expected/blkid/low-probe-erofs +index 1d1600fa0..b815c7e5d 100644 +--- a/tests/expected/blkid/low-probe-erofs ++++ b/tests/expected/blkid/low-probe-erofs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_TYPE=erofs + ID_FS_USAGE=filesystem + ID_FS_UUID=2375febf-f260-479d-ade7-952494047cb4 +diff --git a/tests/expected/blkid/low-probe-exfat b/tests/expected/blkid/low-probe-exfat +index 59cb35225..24d2cac5d 100644 +--- a/tests/expected/blkid/low-probe-exfat ++++ b/tests/expected/blkid/low-probe-exfat +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=Новый_том + ID_FS_LABEL_ENC=Новый\x20том + ID_FS_TYPE=exfat +diff --git a/tests/expected/blkid/low-probe-ext2 b/tests/expected/blkid/low-probe-ext2 +index e236c6e8a..fa284a949 100644 +--- a/tests/expected/blkid/low-probe-ext2 ++++ b/tests/expected/blkid/low-probe-ext2 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSBLOCKSIZE=1024 + ID_FS_FSLASTBLOCK=100 + ID_FS_LABEL=test-ext2 + ID_FS_LABEL_ENC=test-ext2 +diff --git a/tests/expected/blkid/low-probe-ext3 b/tests/expected/blkid/low-probe-ext3 +index 164fefb7b..422d4fef3 100644 +--- a/tests/expected/blkid/low-probe-ext3 ++++ b/tests/expected/blkid/low-probe-ext3 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSBLOCKSIZE=1024 + ID_FS_FSLASTBLOCK=2048 + ID_FS_LABEL=test-ext3 + ID_FS_LABEL_ENC=test-ext3 +diff --git a/tests/expected/blkid/low-probe-f2fs b/tests/expected/blkid/low-probe-f2fs +index 272905125..1ee751d56 100644 +--- a/tests/expected/blkid/low-probe-f2fs ++++ b/tests/expected/blkid/low-probe-f2fs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=test-f2fs + ID_FS_LABEL_ENC=test-f2fs + ID_FS_TYPE=f2fs +diff --git a/tests/expected/blkid/low-probe-fat b/tests/expected/blkid/low-probe-fat +index a463cc987..bb686b24e 100644 +--- a/tests/expected/blkid/low-probe-fat ++++ b/tests/expected/blkid/low-probe-fat +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=TEST-FAT + ID_FS_LABEL_ENC=TEST-FAT + ID_FS_LABEL_FATBOOT=TEST-FAT +diff --git a/tests/expected/blkid/low-probe-fat16_noheads b/tests/expected/blkid/low-probe-fat16_noheads +index ff9ef2e69..5b8fc916e 100644 +--- a/tests/expected/blkid/low-probe-fat16_noheads ++++ b/tests/expected/blkid/low-probe-fat16_noheads +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=VTech_1070 + ID_FS_LABEL_ENC=VTech\x201070 + ID_FS_SEC_TYPE=msdos +diff --git a/tests/expected/blkid/low-probe-fat32_cp850_O_tilde b/tests/expected/blkid/low-probe-fat32_cp850_O_tilde +index ca49f200d..16c519884 100644 +--- a/tests/expected/blkid/low-probe-fat32_cp850_O_tilde ++++ b/tests/expected/blkid/low-probe-fat32_cp850_O_tilde +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=___ + ID_FS_LABEL_ENC=\xe5\xe5\xe5 + ID_FS_LABEL_FATBOOT=___ +diff --git a/tests/expected/blkid/low-probe-fat32_label_64MB b/tests/expected/blkid/low-probe-fat32_label_64MB +index 4a99f8ff6..41b656a84 100644 +--- a/tests/expected/blkid/low-probe-fat32_label_64MB ++++ b/tests/expected/blkid/low-probe-fat32_label_64MB +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=BINGO + ID_FS_LABEL_ENC=BINGO + ID_FS_TYPE=vfat +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1 b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1 +index 5d1771de3..14aee2eb9 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1 ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=label1 + ID_FS_LABEL_ENC=label1 + ID_FS_LABEL_FATBOOT=label1 +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME +index c13af9021..1891157ed 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=NO_NAME + ID_FS_LABEL_ENC=NO\x20NAME + ID_FS_TYPE=vfat +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_empty b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_empty +index 73c553e54..206782fa9 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_empty ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_empty +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_TYPE=vfat + ID_FS_USAGE=filesystem + ID_FS_UUID=92B4-BA66 +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_label2 b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_label2 +index 4b8146208..cf635a218 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_label2 ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_label2 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=label2 + ID_FS_LABEL_ENC=label2 + ID_FS_LABEL_FATBOOT=label2 +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME +index c13af9021..1891157ed 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=NO_NAME + ID_FS_LABEL_ENC=NO\x20NAME + ID_FS_TYPE=vfat +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_erase b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_erase +index 73c553e54..206782fa9 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_erase ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_erase +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_TYPE=vfat + ID_FS_USAGE=filesystem + ID_FS_UUID=92B4-BA66 +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_erase b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_erase +index 075278de4..6088d17be 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_erase ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_erase +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL_FATBOOT=label1 + ID_FS_LABEL_FATBOOT_ENC=label1 + ID_FS_TYPE=vfat +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_label2 b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_label2 +index fe4884d28..802a66f14 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_label2 ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_label2 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=LABEL2 + ID_FS_LABEL_ENC=LABEL2 + ID_FS_LABEL_FATBOOT=label1 +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none b/tests/expected/blkid/low-probe-fat32_mkdosfs_none +index 547517616..66a7923ed 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_none ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_TYPE=vfat + ID_FS_USAGE=filesystem + ID_FS_UUID=E6B8-AF8C +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME +index 547517616..66a7923ed 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_TYPE=vfat + ID_FS_USAGE=filesystem + ID_FS_UUID=E6B8-AF8C +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1 b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1 +index dfacd9b6a..e45da35d8 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1 ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL_FATBOOT=label1 + ID_FS_LABEL_FATBOOT_ENC=label1 + ID_FS_TYPE=vfat +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1_xp_label2 b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1_xp_label2 +index 142259c87..ad2bf8fda 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1_xp_label2 ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1_xp_label2 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=LABEL2 + ID_FS_LABEL_ENC=LABEL2 + ID_FS_LABEL_FATBOOT=label1 +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1 b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1 +index d1360ada0..a5e490064 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1 ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=LABEL1 + ID_FS_LABEL_ENC=LABEL1 + ID_FS_TYPE=vfat +diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1_dosfslabel_label2 b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1_dosfslabel_label2 +index c078359c6..e3473b9cc 100644 +--- a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1_dosfslabel_label2 ++++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1_dosfslabel_label2 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=label2 + ID_FS_LABEL_ENC=label2 + ID_FS_LABEL_FATBOOT=label2 +diff --git a/tests/expected/blkid/low-probe-fat32_xp_label1 b/tests/expected/blkid/low-probe-fat32_xp_label1 +index 8a27d7e1c..9a82d11c2 100644 +--- a/tests/expected/blkid/low-probe-fat32_xp_label1 ++++ b/tests/expected/blkid/low-probe-fat32_xp_label1 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=LABEL1 + ID_FS_LABEL_ENC=LABEL1 + ID_FS_TYPE=vfat +diff --git a/tests/expected/blkid/low-probe-fat32_xp_none b/tests/expected/blkid/low-probe-fat32_xp_none +index f8271c2b7..b4d6f4fdf 100644 +--- a/tests/expected/blkid/low-probe-fat32_xp_none ++++ b/tests/expected/blkid/low-probe-fat32_xp_none +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_TYPE=vfat + ID_FS_USAGE=filesystem + ID_FS_UUID=54B6-DC94 +diff --git a/tests/expected/blkid/low-probe-fat32_xp_none_dosfslabel_label1 b/tests/expected/blkid/low-probe-fat32_xp_none_dosfslabel_label1 +index fdc5eb6f6..560b394a0 100644 +--- a/tests/expected/blkid/low-probe-fat32_xp_none_dosfslabel_label1 ++++ b/tests/expected/blkid/low-probe-fat32_xp_none_dosfslabel_label1 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL_FATBOOT=label1 + ID_FS_LABEL_FATBOOT_ENC=label1 + ID_FS_TYPE=vfat +diff --git a/tests/expected/blkid/low-probe-fat32_xp_none_mlabel_label1 b/tests/expected/blkid/low-probe-fat32_xp_none_mlabel_label1 +index 74f271519..1b0a87806 100644 +--- a/tests/expected/blkid/low-probe-fat32_xp_none_mlabel_label1 ++++ b/tests/expected/blkid/low-probe-fat32_xp_none_mlabel_label1 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=LABEL1 + ID_FS_LABEL_ENC=LABEL1 + ID_FS_LABEL_FATBOOT=LABEL1 +diff --git a/tests/expected/blkid/low-probe-gfs2 b/tests/expected/blkid/low-probe-gfs2 +index f04529bc0..8b2840f41 100644 +--- a/tests/expected/blkid/low-probe-gfs2 ++++ b/tests/expected/blkid/low-probe-gfs2 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=mycluster:mygfs2 + ID_FS_LABEL_ENC=mycluster:mygfs2 + ID_FS_TYPE=gfs2 +diff --git a/tests/expected/blkid/low-probe-hfsplus b/tests/expected/blkid/low-probe-hfsplus +index cc351a042..07e60ea25 100644 +--- a/tests/expected/blkid/low-probe-hfsplus ++++ b/tests/expected/blkid/low-probe-hfsplus +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=123456789ABCDE + ID_FS_LABEL_ENC=123456789ABCDE + ID_FS_TYPE=hfsplus +diff --git a/tests/expected/blkid/low-probe-hpfs b/tests/expected/blkid/low-probe-hpfs +index 7e4a12b97..a6198c640 100644 +--- a/tests/expected/blkid/low-probe-hpfs ++++ b/tests/expected/blkid/low-probe-hpfs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=P01_S16A + ID_FS_LABEL_ENC=P01\x20S16A + ID_FS_TYPE=hpfs +diff --git a/tests/expected/blkid/low-probe-iso b/tests/expected/blkid/low-probe-iso +index 5c8a3d0fd..3e9be8f98 100644 +--- a/tests/expected/blkid/low-probe-iso ++++ b/tests/expected/blkid/low-probe-iso +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=IsoVolumeName + ID_FS_LABEL_ENC=IsoVolumeName + ID_FS_SYSTEM_ID=LINUX +diff --git a/tests/expected/blkid/low-probe-iso-different-iso-joliet-label b/tests/expected/blkid/low-probe-iso-different-iso-joliet-label +index f618d024d..34663a358 100644 +--- a/tests/expected/blkid/low-probe-iso-different-iso-joliet-label ++++ b/tests/expected/blkid/low-probe-iso-different-iso-joliet-label +@@ -1,6 +1,7 @@ + ID_FS_APPLICATION_ID=Joliet\x20Application + ID_FS_BLOCK_SIZE=2048 + ID_FS_DATA_PREPARER_ID=Joliet\x20Preparer ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=Joliet_Label + ID_FS_LABEL_ENC=Joliet\x20Label + ID_FS_PUBLISHER_ID=Joliet\x20Publisher +diff --git a/tests/expected/blkid/low-probe-iso-joliet b/tests/expected/blkid/low-probe-iso-joliet +index e97dbde3c..c92484a75 100644 +--- a/tests/expected/blkid/low-probe-iso-joliet ++++ b/tests/expected/blkid/low-probe-iso-joliet +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=ThisWonderfulLabelIsVeryVeryLong + ID_FS_LABEL_ENC=ThisWonderfulLabelIsVeryVeryLong + ID_FS_SYSTEM_ID=LINUX +diff --git a/tests/expected/blkid/low-probe-iso-multi-genisoimage-0 b/tests/expected/blkid/low-probe-iso-multi-genisoimage-0 +index d8217f529..eed747e48 100644 +--- a/tests/expected/blkid/low-probe-iso-multi-genisoimage-0 ++++ b/tests/expected/blkid/low-probe-iso-multi-genisoimage-0 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=first_session + ID_FS_LABEL_ENC=first\x20session + ID_FS_SYSTEM_ID=LINUX +diff --git a/tests/expected/blkid/low-probe-iso-multi-genisoimage-174 b/tests/expected/blkid/low-probe-iso-multi-genisoimage-174 +index 9c18d0dde..aa71cff78 100644 +--- a/tests/expected/blkid/low-probe-iso-multi-genisoimage-174 ++++ b/tests/expected/blkid/low-probe-iso-multi-genisoimage-174 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=second_session + ID_FS_LABEL_ENC=second\x20session + ID_FS_SYSTEM_ID=LINUX +diff --git a/tests/expected/blkid/low-probe-iso-multi-genisoimage-348 b/tests/expected/blkid/low-probe-iso-multi-genisoimage-348 +index 7e3c5ba01..caf2010a5 100644 +--- a/tests/expected/blkid/low-probe-iso-multi-genisoimage-348 ++++ b/tests/expected/blkid/low-probe-iso-multi-genisoimage-348 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=third_session + ID_FS_LABEL_ENC=third\x20session + ID_FS_SYSTEM_ID=LINUX +diff --git a/tests/expected/blkid/low-probe-iso-rr-joliet b/tests/expected/blkid/low-probe-iso-rr-joliet +index 711e04bbc..fdfc69616 100644 +--- a/tests/expected/blkid/low-probe-iso-rr-joliet ++++ b/tests/expected/blkid/low-probe-iso-rr-joliet +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=ThisIsVolumeName + ID_FS_LABEL_ENC=ThisIsVolumeName + ID_FS_SYSTEM_ID=LINUX +diff --git a/tests/expected/blkid/low-probe-iso-unicode-long-label b/tests/expected/blkid/low-probe-iso-unicode-long-label +index 270ee8489..11403fdb0 100644 +--- a/tests/expected/blkid/low-probe-iso-unicode-long-label ++++ b/tests/expected/blkid/low-probe-iso-unicode-long-label +@@ -1,6 +1,7 @@ + ID_FS_APPLICATION_ID=Nero\x20Linux + ID_FS_BLOCK_SIZE=2048 + ID_FS_DATA_PREPARER_ID=Naïve\x20and\x20very\x20looooooooooooooooooooooooooooooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG\x20DATA\x20PREPARER ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=Naïve_and_very_lOOOOOOOONG_LABEL + ID_FS_LABEL_ENC=Naïve\x20and\x20very\x20lOOOOOOOONG_LABEL + ID_FS_PUBLISHER_ID=Naïve\x20and\x20very\x20looooooooooooooooooooooooooooooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG\x20PUBLISHER +diff --git a/tests/expected/blkid/low-probe-jbd b/tests/expected/blkid/low-probe-jbd +index f5462a2a3..36c7d4062 100644 +--- a/tests/expected/blkid/low-probe-jbd ++++ b/tests/expected/blkid/low-probe-jbd +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSBLOCKSIZE=1024 + ID_FS_FSLASTBLOCK=1024 + ID_FS_LOGUUID=0d7a07df-7b06-4829-bce7-3b9c3ece570c + ID_FS_TYPE=jbd +diff --git a/tests/expected/blkid/low-probe-jfs b/tests/expected/blkid/low-probe-jfs +index ac7d31bac..ee6e1ead8 100644 +--- a/tests/expected/blkid/low-probe-jfs ++++ b/tests/expected/blkid/low-probe-jfs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=test-jfs + ID_FS_LABEL_ENC=test-jfs + ID_FS_TYPE=jfs +diff --git a/tests/expected/blkid/low-probe-minix-BE b/tests/expected/blkid/low-probe-minix-BE +index f73f1b5db..c6da3c195 100644 +--- a/tests/expected/blkid/low-probe-minix-BE ++++ b/tests/expected/blkid/low-probe-minix-BE +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSBLOCKSIZE=1024 + ID_FS_TYPE=minix + ID_FS_USAGE=filesystem + ID_FS_VERSION=1 +diff --git a/tests/expected/blkid/low-probe-minix-LE b/tests/expected/blkid/low-probe-minix-LE +index f73f1b5db..c6da3c195 100644 +--- a/tests/expected/blkid/low-probe-minix-LE ++++ b/tests/expected/blkid/low-probe-minix-LE +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSBLOCKSIZE=1024 + ID_FS_TYPE=minix + ID_FS_USAGE=filesystem + ID_FS_VERSION=1 +diff --git a/tests/expected/blkid/low-probe-nilfs2 b/tests/expected/blkid/low-probe-nilfs2 +index ff27e0b23..4bd466552 100644 +--- a/tests/expected/blkid/low-probe-nilfs2 ++++ b/tests/expected/blkid/low-probe-nilfs2 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=test-nilfs2 + ID_FS_LABEL_ENC=test-nilfs2 + ID_FS_TYPE=nilfs2 +diff --git a/tests/expected/blkid/low-probe-ntfs b/tests/expected/blkid/low-probe-ntfs +index 790157aaa..64722f2a7 100644 +--- a/tests/expected/blkid/low-probe-ntfs ++++ b/tests/expected/blkid/low-probe-ntfs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=Новый_том + ID_FS_LABEL_ENC=Новый\x20том + ID_FS_TYPE=ntfs +diff --git a/tests/expected/blkid/low-probe-ocfs2 b/tests/expected/blkid/low-probe-ocfs2 +index 9b84dbe67..99189f39f 100644 +--- a/tests/expected/blkid/low-probe-ocfs2 ++++ b/tests/expected/blkid/low-probe-ocfs2 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSBLOCKSIZE=1024 + ID_FS_LABEL=test-ocfs2 + ID_FS_LABEL_ENC=test-ocfs2 + ID_FS_TYPE=ocfs2 +diff --git a/tests/expected/blkid/low-probe-reiser3 b/tests/expected/blkid/low-probe-reiser3 +index 1c4b1478d..3ae71201c 100644 +--- a/tests/expected/blkid/low-probe-reiser3 ++++ b/tests/expected/blkid/low-probe-reiser3 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=TESTREISER + ID_FS_LABEL_ENC=TESTREISER + ID_FS_TYPE=reiserfs +diff --git a/tests/expected/blkid/low-probe-reiser4 b/tests/expected/blkid/low-probe-reiser4 +index 66df064fd..f8896bb57 100644 +--- a/tests/expected/blkid/low-probe-reiser4 ++++ b/tests/expected/blkid/low-probe-reiser4 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=TESTR4 + ID_FS_LABEL_ENC=TESTR4 + ID_FS_TYPE=reiser4 +diff --git a/tests/expected/blkid/low-probe-romfs b/tests/expected/blkid/low-probe-romfs +index b56a6b881..2c606ecc1 100644 +--- a/tests/expected/blkid/low-probe-romfs ++++ b/tests/expected/blkid/low-probe-romfs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSBLOCKSIZE=1024 + ID_FS_LABEL=test-romfs + ID_FS_LABEL_ENC=test-romfs + ID_FS_TYPE=romfs +diff --git a/tests/expected/blkid/low-probe-small-fat32 b/tests/expected/blkid/low-probe-small-fat32 +index d9c63c710..e6ffb6550 100644 +--- a/tests/expected/blkid/low-probe-small-fat32 ++++ b/tests/expected/blkid/low-probe-small-fat32 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=TESTVFAT + ID_FS_LABEL_ENC=TESTVFAT + ID_FS_LABEL_FATBOOT=TESTVFAT +diff --git a/tests/expected/blkid/low-probe-udf b/tests/expected/blkid/low-probe-udf +index b00ae7b8a..d8cd25bbf 100644 +--- a/tests/expected/blkid/low-probe-udf ++++ b/tests/expected/blkid/low-probe-udf +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=genisoimage + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=test-udf + ID_FS_LABEL_ENC=test-udf + ID_FS_LOGICAL_VOLUME_ID=test-udf +diff --git a/tests/expected/blkid/low-probe-udf-bdr-2.60-nero b/tests/expected/blkid/low-probe-udf-bdr-2.60-nero +index 006499223..677c2a353 100644 +--- a/tests/expected/blkid/low-probe-udf-bdr-2.60-nero ++++ b/tests/expected/blkid/low-probe-udf-bdr-2.60-nero +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Nero + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=Label + ID_FS_LABEL_ENC=Label + ID_FS_LOGICAL_VOLUME_ID=Label +diff --git a/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 b/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 +index 649e5be94..924d78f7d 100644 +--- a/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 ++++ b/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=mkudfiso + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=Volume_Label + ID_FS_LABEL_ENC=Volume\x20Label + ID_FS_LOGICAL_VOLUME_ID=Volume\x20Label +diff --git a/tests/expected/blkid/low-probe-udf-cd-nero-6 b/tests/expected/blkid/low-probe-udf-cd-nero-6 +index 7474bc4db..bc1b5fe85 100644 +--- a/tests/expected/blkid/low-probe-udf-cd-nero-6 ++++ b/tests/expected/blkid/low-probe-udf-cd-nero-6 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Nero + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=UDF_Label + ID_FS_LABEL_ENC=UDF\x20Label + ID_FS_LOGICAL_VOLUME_ID=UDF\x20Label +diff --git a/tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096 b/tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096 +index 152877a13..c8e5ac396 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096 ++++ b/tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Mac\x20OS\x20X\x20udf\x20newfs_udf + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=Untitled_UDF_Volume + ID_FS_LABEL_ENC=Untitled\x20UDF\x20Volume + ID_FS_LOGICAL_VOLUME_ID=Untitled\x20UDF\x20Volume +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 +index 930259204..0f073c007 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=LinuxUDF + ID_FS_LABEL_ENC=LinuxUDF + ID_FS_LOGICAL_VOLUME_ID=LinuxUDF +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 +index a0fdb2ee2..c55e23326 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=Label + ID_FS_LABEL_ENC=Label + ID_FS_LOGICAL_VOLUME_ID=Label +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 +index ef36b84e0..37586914c 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=Label + ID_FS_LABEL_ENC=Label + ID_FS_LOGICAL_VOLUME_ID=Label +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 +index 58a8bf612..521e0ff12 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=Label + ID_FS_LABEL_ENC=Label + ID_FS_LOGICAL_VOLUME_ID=Label +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 +index 0e1e7706b..e720867bd 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=ÿ + ID_FS_LABEL_ENC=ÿ + ID_FS_LOGICAL_VOLUME_ID=ÿ +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 +index 00561717d..ecd8c3c9f 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=1024 ++ID_FS_FSBLOCKSIZE=1024 + ID_FS_LABEL=Label + ID_FS_LABEL_ENC=Label + ID_FS_LOGICAL_VOLUME_ID=Label +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 +index 69ee62f97..df2d901f5 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=Label + ID_FS_LABEL_ENC=Label + ID_FS_LOGICAL_VOLUME_ID=Label +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 +index 2d3876b7e..aba8d2e48 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + ID_FS_LABEL_ENC=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + ID_FS_LOGICAL_VOLUME_ID=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 +index e60bf1793..67faf3424 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_LABEL=Label4096 + ID_FS_LABEL_ENC=Label4096 + ID_FS_LOGICAL_VOLUME_ID=Label4096 +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 +index 078578242..11a3bde27 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=LinuxUDF + ID_FS_LABEL_ENC=LinuxUDF + ID_FS_LOGICAL_VOLUME_ID=LinuxUDF +diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 +index 77300512a..c61e8b5eb 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 ++++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=😀 + ID_FS_LABEL_ENC=😀 + ID_FS_LOGICAL_VOLUME_ID=😀 +diff --git a/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 +index 6cb1ffeee..c173bb8d6 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 ++++ b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=UDFtoolkit + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=discname + ID_FS_LABEL_ENC=discname + ID_FS_LOGICAL_VOLUME_ID=discname +diff --git a/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 +index 7a35e0f0d..4c71a0cce 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 ++++ b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=UDFtoolkit + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=discname + ID_FS_LABEL_ENC=discname + ID_FS_LOGICAL_VOLUME_ID=discname +diff --git a/tests/expected/blkid/low-probe-udf-hdd-win7 b/tests/expected/blkid/low-probe-udf-hdd-win7 +index ad9616bc7..eafa7f019 100644 +--- a/tests/expected/blkid/low-probe-udf-hdd-win7 ++++ b/tests/expected/blkid/low-probe-udf-hdd-win7 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Microsoft\x20Windows + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=My_volume_label + ID_FS_LABEL_ENC=My\x20volume\x20label + ID_FS_LOGICAL_VOLUME_ID=My\x20volume\x20label +diff --git a/tests/expected/blkid/low-probe-udf-multi-genisoimage-0 b/tests/expected/blkid/low-probe-udf-multi-genisoimage-0 +index f598baaa0..5eeb78d33 100644 +--- a/tests/expected/blkid/low-probe-udf-multi-genisoimage-0 ++++ b/tests/expected/blkid/low-probe-udf-multi-genisoimage-0 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=genisoimage + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=first_session + ID_FS_LABEL_ENC=first\x20session + ID_FS_LOGICAL_VOLUME_ID=first\x20session +diff --git a/tests/expected/blkid/low-probe-udf-multi-genisoimage-417 b/tests/expected/blkid/low-probe-udf-multi-genisoimage-417 +index bb4d8c72f..5d2c7843f 100644 +--- a/tests/expected/blkid/low-probe-udf-multi-genisoimage-417 ++++ b/tests/expected/blkid/low-probe-udf-multi-genisoimage-417 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=genisoimage + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=second_session + ID_FS_LABEL_ENC=second\x20session + ID_FS_LOGICAL_VOLUME_ID=second\x20session +diff --git a/tests/expected/blkid/low-probe-udf-multi-genisoimage-834 b/tests/expected/blkid/low-probe-udf-multi-genisoimage-834 +index bc4dcba65..aa7a1630a 100644 +--- a/tests/expected/blkid/low-probe-udf-multi-genisoimage-834 ++++ b/tests/expected/blkid/low-probe-udf-multi-genisoimage-834 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=genisoimage + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=third_session + ID_FS_LABEL_ENC=third\x20session + ID_FS_LOGICAL_VOLUME_ID=third\x20session +diff --git a/tests/expected/blkid/low-probe-udf-multi-mkudffs-0 b/tests/expected/blkid/low-probe-udf-multi-mkudffs-0 +index 07557d7ca..a1a234e89 100644 +--- a/tests/expected/blkid/low-probe-udf-multi-mkudffs-0 ++++ b/tests/expected/blkid/low-probe-udf-multi-mkudffs-0 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=first_session + ID_FS_LABEL_ENC=first\x20session + ID_FS_LOGICAL_VOLUME_ID=first\x20session +diff --git a/tests/expected/blkid/low-probe-udf-multi-mkudffs-320 b/tests/expected/blkid/low-probe-udf-multi-mkudffs-320 +index 458cf3e23..84285894d 100644 +--- a/tests/expected/blkid/low-probe-udf-multi-mkudffs-320 ++++ b/tests/expected/blkid/low-probe-udf-multi-mkudffs-320 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=second_session + ID_FS_LABEL_ENC=second\x20session + ID_FS_LOGICAL_VOLUME_ID=second\x20session +diff --git a/tests/expected/blkid/low-probe-udf-multi-mkudffs-640 b/tests/expected/blkid/low-probe-udf-multi-mkudffs-640 +index 04cc4f11c..59c914280 100644 +--- a/tests/expected/blkid/low-probe-udf-multi-mkudffs-640 ++++ b/tests/expected/blkid/low-probe-udf-multi-mkudffs-640 +@@ -1,5 +1,6 @@ + ID_FS_APPLICATION_ID=Linux\x20mkudffs + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_LABEL=third_session + ID_FS_LABEL_ENC=third\x20session + ID_FS_LOGICAL_VOLUME_ID=third\x20session +diff --git a/tests/expected/blkid/low-probe-ufs b/tests/expected/blkid/low-probe-ufs +index 256f065d2..d771bc8d5 100644 +--- a/tests/expected/blkid/low-probe-ufs ++++ b/tests/expected/blkid/low-probe-ufs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=2048 ++ID_FS_FSBLOCKSIZE=2048 + ID_FS_TYPE=ufs + ID_FS_USAGE=filesystem + ID_FS_UUID=4b0e640aec56ac70 +diff --git a/tests/expected/blkid/low-probe-xfs b/tests/expected/blkid/low-probe-xfs +index be9c4194a..0eb803f52 100644 +--- a/tests/expected/blkid/low-probe-xfs ++++ b/tests/expected/blkid/low-probe-xfs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_FSLASTBLOCK=4096 + ID_FS_FSSIZE=11862016 + ID_FS_LABEL=test-xfs +diff --git a/tests/expected/blkid/low-probe-xfs-v5 b/tests/expected/blkid/low-probe-xfs-v5 +index fd2cba933..7525b0888 100644 +--- a/tests/expected/blkid/low-probe-xfs-v5 ++++ b/tests/expected/blkid/low-probe-xfs-v5 +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_FSLASTBLOCK=5120 + ID_FS_FSSIZE=17469440 + ID_FS_LABEL=test-xfs-v5 +diff --git a/tests/expected/blkid/low-probe-zfs b/tests/expected/blkid/low-probe-zfs +index 0e7af2866..f7e481b54 100644 +--- a/tests/expected/blkid/low-probe-zfs ++++ b/tests/expected/blkid/low-probe-zfs +@@ -1,4 +1,5 @@ + ID_FS_BLOCK_SIZE=512 ++ID_FS_FSBLOCKSIZE=512 + ID_FS_LABEL=tank + ID_FS_LABEL_ENC=tank + ID_FS_TYPE=zfs_member +diff --git a/tests/expected/blkid/low-probe-zonefs b/tests/expected/blkid/low-probe-zonefs +index cc15459a1..59c86f3fd 100644 +--- a/tests/expected/blkid/low-probe-zonefs ++++ b/tests/expected/blkid/low-probe-zonefs +@@ -1,3 +1,4 @@ + ID_FS_BLOCK_SIZE=4096 ++ID_FS_FSBLOCKSIZE=4096 + ID_FS_TYPE=zonefs + ID_FS_USAGE=filesystem +-- +2.36.1 + diff --git a/SOURCES/0030-libblkid-update-documentation-of-BLOCK_SIZE-tag.patch b/SOURCES/0030-libblkid-update-documentation-of-BLOCK_SIZE-tag.patch new file mode 100644 index 0000000..31d7eb7 --- /dev/null +++ b/SOURCES/0030-libblkid-update-documentation-of-BLOCK_SIZE-tag.patch @@ -0,0 +1,32 @@ +From 5300d69be2919d0a50968377d23807831fdf3f71 Mon Sep 17 00:00:00 2001 +From: Andrey Albershteyn +Date: Fri, 27 May 2022 12:56:27 +0200 +Subject: libblkid: update documentation of BLOCK_SIZE tag + +The name BLOCK_SIZE is unfortunate. This tag doesn't represent +commonly used file system block size but minimal block size +accessible by file system (sector size). + +Upstream: http://github.com/util-linux/util-linux/commit/895f0b609 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2064810 +Signed-off-by: Andrey Albershteyn +--- + libblkid/src/superblocks/superblocks.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c +index 9cfa991fc..9c32bc9d5 100644 +--- a/libblkid/src/superblocks/superblocks.c ++++ b/libblkid/src/superblocks/superblocks.c +@@ -80,7 +80,7 @@ + * + * @BOOT_SYSTEM_ID: ISO9660 boot system identifier + * +- * @BLOCK_SIZE: block size ++ * @BLOCK_SIZE: minimal block size accessible by file system + */ + + static int superblocks_probe(blkid_probe pr, struct blkid_chain *chn); +-- +2.36.1 + diff --git a/SOURCES/0031-cfdisk-don-t-use-NULL-in-printf-coverity-scan.patch b/SOURCES/0031-cfdisk-don-t-use-NULL-in-printf-coverity-scan.patch new file mode 100644 index 0000000..69ec275 --- /dev/null +++ b/SOURCES/0031-cfdisk-don-t-use-NULL-in-printf-coverity-scan.patch @@ -0,0 +1,28 @@ +From da3add097b70160cd2c6bab0a4acb699df07ebe8 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 17 Mar 2022 10:48:33 +0100 +Subject: cfdisk: don't use NULL in printf [coverity scan] + +Upstream: http://github.com/util-linux/util-linux/commit/30cc5f5751698cccb625193f715f1a606a7f91b4 +Addresses: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2109459 +Signed-off-by: Karel Zak +--- + disk-utils/cfdisk.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c +index c1b28889f..36eb3f8c6 100644 +--- a/disk-utils/cfdisk.c ++++ b/disk-utils/cfdisk.c +@@ -2080,7 +2080,7 @@ done: + } + free(cm); + DBG(UI, ul_debug("get parrtype done [type=%s] ", t ? +- fdisk_parttype_get_name(t) : NULL)); ++ fdisk_parttype_get_name(t) : "")); + return t; + } + +-- +2.36.1 + diff --git a/SOURCES/0032-zramctl-fix-compiler-warning-Werror-maybe-uninitiali.patch b/SOURCES/0032-zramctl-fix-compiler-warning-Werror-maybe-uninitiali.patch new file mode 100644 index 0000000..a3563c8 --- /dev/null +++ b/SOURCES/0032-zramctl-fix-compiler-warning-Werror-maybe-uninitiali.patch @@ -0,0 +1,28 @@ +From cee4a7f69d853fcc574241d394edc5bcb91469a5 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 6 Jun 2022 16:19:16 +0200 +Subject: zramctl: fix compiler warning [-Werror=maybe-uninitialized] + +Upstream: http://github.com/util-linux/util-linux/commit/8883f037466a5534554d7d9114aceb740295ef20 +Addresses: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2109459 +Signed-off-by: Karel Zak +--- + sys-utils/zramctl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c +index 003349fad..64d5fcd81 100644 +--- a/sys-utils/zramctl.c ++++ b/sys-utils/zramctl.c +@@ -291,7 +291,7 @@ static struct path_cxt *zram_get_control(void) + + static int zram_control_add(struct zram *z) + { +- int n; ++ int n = 0; + struct path_cxt *ctl; + + if (!zram_has_control(z) || !(ctl = zram_get_control())) +-- +2.36.1 + diff --git a/SOURCES/0033-lib-path-make-ul_path_read_buffer-more-robust-coveri.patch b/SOURCES/0033-lib-path-make-ul_path_read_buffer-more-robust-coveri.patch new file mode 100644 index 0000000..ce2ca44 --- /dev/null +++ b/SOURCES/0033-lib-path-make-ul_path_read_buffer-more-robust-coveri.patch @@ -0,0 +1,46 @@ +From f6fffc1a89e57b7d5dd4adf1ee6b2146e58ec411 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 17 Mar 2022 12:18:03 +0100 +Subject: lib/path: make ul_path_read_buffer() more robust [coverity scan] + +Make sure we never call buf[rc - 1] for rc=0. + +Upstream: http://github.com/util-linux/util-linux/commit/ea459dcf95d0bb04c816b71d2b85fbcd8cfc5ee4 +Addresses: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2109459 +Signed-off-by: Karel Zak +--- + lib/path.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/lib/path.c b/lib/path.c +index 21f9bd1c4..ab034e110 100644 +--- a/lib/path.c ++++ b/lib/path.c +@@ -666,14 +666,17 @@ int ul_path_readf_string(struct path_cxt *pc, char **str, const char *path, ...) + int ul_path_read_buffer(struct path_cxt *pc, char *buf, size_t bufsz, const char *path) + { + int rc = ul_path_read(pc, buf, bufsz - 1, path); +- if (rc < 0) +- return rc; + +- /* Remove tailing newline (usual in sysfs) */ +- if (rc > 0 && *(buf + rc - 1) == '\n') +- buf[--rc] = '\0'; +- else +- buf[rc - 1] = '\0'; ++ if (rc == 0) ++ buf[0] = '\0'; ++ ++ else if (rc > 0) { ++ /* Remove tailing newline (usual in sysfs) */ ++ if (*(buf + rc - 1) == '\n') ++ buf[--rc] = '\0'; ++ else ++ buf[rc - 1] = '\0'; ++ } + + return rc; + } +-- +2.36.1 + diff --git a/SOURCES/0034-lslogins-improve-for-static-analyzer.patch b/SOURCES/0034-lslogins-improve-for-static-analyzer.patch new file mode 100644 index 0000000..ae0bd20 --- /dev/null +++ b/SOURCES/0034-lslogins-improve-for-static-analyzer.patch @@ -0,0 +1,27 @@ +From 53af90a8edf2e60342b477d28e0d802dc26f18b7 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 9 Aug 2022 12:35:05 +0200 +Subject: lslogins: improve for static analyzer + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2094216 +Signed-off-by: Karel Zak +--- + login-utils/lslogins.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c +index ff4386d1b..56431212d 100644 +--- a/login-utils/lslogins.c ++++ b/login-utils/lslogins.c +@@ -852,7 +852,7 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c + while (p && *p == '!') + p++, i++; + +- if (i != 0 && (!*p || valid_pwd(p))) ++ if (i != 0 && p && (!*p || valid_pwd(p))) + user->pwd_lock = STATUS_TRUE; + } else + user->pwd_lock = STATUS_UNKNOWN; +-- +2.37.1 + diff --git a/SOURCES/0035-tests-add-udevadm-settle-to-loop-overlap-test.patch b/SOURCES/0035-tests-add-udevadm-settle-to-loop-overlap-test.patch new file mode 100644 index 0000000..ac4fa70 --- /dev/null +++ b/SOURCES/0035-tests-add-udevadm-settle-to-loop-overlap-test.patch @@ -0,0 +1,48 @@ +From 723438ad02928d9614439def99b36e0758f62d26 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Fri, 12 Aug 2022 08:30:49 +0200 +Subject: tests: add udevadm settle to loop overlap test + +Addresses: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2117203 +Signed-off-by: Karel Zak +--- + tests/ts/libmount/loop-overlay | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/tests/ts/libmount/loop-overlay b/tests/ts/libmount/loop-overlay +index 62874a182..c27f60d0f 100755 +--- a/tests/ts/libmount/loop-overlay ++++ b/tests/ts/libmount/loop-overlay +@@ -43,22 +43,29 @@ dd if="$IMG" of="$IMG" oflag=append bs=1024k count=5 conv=notrunc &>/dev/null + + echo "second should fail" >>$TS_OUTPUT + $TS_CMD_MOUNT -oloop "$IMG" "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG ++udevadm settle + $TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" 2>&1 \ + | sed 's/:.*:/: /; s/for .*/for /' >> $TS_OUTPUT + $TS_CMD_UMOUNT "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG ++udevadm settle + + echo "should succeed" >>$TS_OUTPUT + $TS_CMD_MOUNT -oloop,sizelimit=$OFFSET "$IMG" "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG ++udevadm settle + $TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" >> $TS_OUTPUT 2>> $TS_ERRLOG ++udevadm settle + $TS_CMD_UMOUNT "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG + $TS_CMD_UMOUNT "$TS_MOUNTPOINT-2" >> $TS_OUTPUT 2>> $TS_ERRLOG ++udevadm settle + + echo "both should fail" >>$TS_OUTPUT + LOOPDEV=$($TS_CMD_LOSETUP --show -f --offset 1 --sizelimit $OFFSET "$IMG") ++udevadm settle + $TS_CMD_MOUNT -oloop,sizelimit=$OFFSET "$IMG" "$TS_MOUNTPOINT-1" 2>&1 \ + | sed 's/:.*:/: /; s/for .*/for /' >> $TS_OUTPUT + $TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" 2>&1 \ + | sed 's/:.*:/: /; s/for .*/for /' >> $TS_OUTPUT ++udevadm settle + $TS_CMD_LOSETUP --detach $LOOPDEV + + ts_log "Success" +-- +2.37.2 + diff --git a/SOURCES/0036-lslogins-support-more-password-methods.patch b/SOURCES/0036-lslogins-support-more-password-methods.patch new file mode 100644 index 0000000..8c81fab --- /dev/null +++ b/SOURCES/0036-lslogins-support-more-password-methods.patch @@ -0,0 +1,161 @@ +From a1dfd3c737f7dad832b0f6ec975bcc5c9cc80ffe Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 24 Aug 2022 12:20:25 +0200 +Subject: lslogins: support more password methods + +* detect more hashing methods + +* don't care about hash size + +* follow crypt(5) when check for valid chars + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2094216 +Upstream: http://github.com/util-linux/util-linux/commit/2b9373e06243d5adf93d627916a5421b34a7e63f +Reported-by: Radka Skvarilova +Signed-off-by: Karel Zak +--- + login-utils/lslogins.c | 66 +++++++++++++++++++++++++++--------------- + 1 file changed, 42 insertions(+), 24 deletions(-) + +diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c +index 56431212d..22e3cd23e 100644 +--- a/login-utils/lslogins.c ++++ b/login-utils/lslogins.c +@@ -598,7 +598,7 @@ static int get_nprocs(const uid_t uid) + } + #endif + +-static const char *get_pwd_method(const char *str, const char **next, unsigned int *sz) ++static const char *get_pwd_method(const char *str, const char **next) + { + const char *p = str; + const char *res = NULL; +@@ -606,32 +606,50 @@ static const char *get_pwd_method(const char *str, const char **next, unsigned i + if (!p || *p++ != '$') + return NULL; + +- if (sz) +- *sz = 0; +- + switch (*p) { + case '1': + res = "MD5"; +- if (sz) +- *sz = 22; + break; + case '2': +- p++; +- if (*p == 'a' || *p == 'y') ++ switch(*(p+1)) { ++ case 'a': ++ case 'y': ++ p++; + res = "Blowfish"; ++ break; ++ case 'b': ++ p++; ++ res = "bcrypt"; ++ break; ++ } ++ break; ++ case '3': ++ res = "NT"; + break; + case '5': + res = "SHA-256"; +- if (sz) +- *sz = 43; + break; + case '6': + res = "SHA-512"; +- if (sz) +- *sz = 86; ++ break; ++ case '7': ++ res = "scrypt"; ++ break; ++ case 'y': ++ res = "yescrypt"; ++ break; ++ case 'g': ++ if (*(p + 1) == 'y') { ++ p++; ++ res = "gost-yescrypt"; ++ } ++ break; ++ case '_': ++ res = "bsdicrypt"; + break; + default: +- return NULL; ++ res = "unknown"; ++ break; + } + p++; + +@@ -642,7 +660,10 @@ static const char *get_pwd_method(const char *str, const char **next, unsigned i + return res; + } + +-#define is_valid_pwd_char(x) (isalnum((unsigned char) (x)) || (x) == '.' || (x) == '/') ++#define is_invalid_pwd_char(x) (isspace((unsigned char) (x)) || \ ++ (x) == ':' || (x) == ';' || (x) == '*' || \ ++ (x) == '!' || (x) == '\\') ++#define is_valid_pwd_char(x) (isascii((unsigned char) (x)) && !is_invalid_pwd_char(x)) + + /* + * This function do not accept empty passwords or locked accouns. +@@ -650,17 +671,16 @@ static const char *get_pwd_method(const char *str, const char **next, unsigned i + static int valid_pwd(const char *str) + { + const char *p = str; +- unsigned int sz = 0, n; + + if (!str || !*str) + return 0; + + /* $id$ */ +- if (get_pwd_method(str, &p, &sz) == NULL) ++ if (get_pwd_method(str, &p) == NULL) + return 0; ++ + if (!p || !*p) + return 0; +- + /* salt$ */ + for (; *p; p++) { + if (*p == '$') { +@@ -670,17 +690,15 @@ static int valid_pwd(const char *str) + if (!is_valid_pwd_char(*p)) + return 0; + } ++ + if (!*p) + return 0; +- + /* encrypted */ +- for (n = 0; *p; p++, n++) { +- if (!is_valid_pwd_char(*p)) ++ for (; *p; p++) { ++ if (!is_valid_pwd_char(*p)) { + return 0; ++ } + } +- +- if (sz && n != sz) +- return 0; + return 1; + } + +@@ -863,7 +881,7 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c + + while (p && (*p == '!' || *p == '*')) + p++; +- user->pwd_method = get_pwd_method(p, NULL, NULL); ++ user->pwd_method = get_pwd_method(p, NULL); + } else + user->pwd_method = NULL; + break; +-- +2.37.2 + diff --git a/SPECS/util-linux.spec b/SPECS/util-linux.spec index 894db82..70740b3 100644 --- a/SPECS/util-linux.spec +++ b/SPECS/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.37.4 -Release: 3%{?dist} +Release: 9%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -32,9 +32,7 @@ Buildrequires: libuser-devel BuildRequires: libcap-ng-devel BuildRequires: %{pypkg}-devel BuildRequires: gcc -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool +BuildRequires: git BuildRequires: rubygem-asciidoctor %ifarch ppc64le BuildRequires: librtas-devel @@ -112,6 +110,46 @@ Patch8: 0008-logger-fix-size-use-for-stdin.patch # 2057046 - wdctl not picking up reboot reason flag Patch9: 0009-wdctl-Workaround-reported-boot-status-bits-not-being.patch +### RHEL-9.1.0 +# +# 2094216 - lslogins reports incorrect "Password is locked" status +Patch10: 0010-lslogins-remove-unexpected-debug-message.patch +Patch11: 0011-lslogins-improve-prefixes-interpretation.patch +Patch12: 0012-lslogins-fix-free-invalid-pointer.patch +Patch13: 0013-login-utils-logindefs-fix-compiler-warning-Werror-fo.patch +# 2092943 - uuidd time based UUIDs are without MAC address +Patch14: 0014-uuidd-allow-AF_INET-in-systemd-service.patch +Patch15: 0015-uuidd-remove-also-PrivateNetwork-yes-from-systemd-se.patch +# 2078787 - Activity "lsirq -s column" produces wrong result i.e. not sorting properly. +Patch16: 0016-lsirq-improve-sort-IRQ.patch +Patch17: 0017-irqtop-fix-compiler-warning-Werror-format-truncation.patch +# 2076829 - dmesg new option "--since" is not working if timestamp format is not provided +Patch18: 0018-dmesg-fix-since-and-until.patch +# 2074486 - Command (wipefs -a) to erase all available signatures against read only rom return 0 with dmesg error +Patch19: 0019-libblkid-check-fsync-return-code.patch +# 2064810 - RFE: complete libblkid FSSIZE implementation +Patch20: 0020-libblkid-add-interface-for-FSSIZE-field.patch +Patch21: 0021-libblkid-implement-FSSIZE-calculation-for-XFS.patch +Patch22: 0022-blkid-add-FSSIZE-tag-with-tests-for-XFS.patch +Patch23: 0023-libblkid-fix-FSSIZE-docs.patch +Patch24: 0024-libblkid-add-FSLASTBLOCK-field-interface-showing-are.patch +Patch25: 0025-libblkid-add-FSLASTBLOCK-implementation-for-xfs-ext-.patch +Patch26: 0026-blkid-add-image-for-btrfs-testing.patch +Patch27: 0027-blkid-add-tests-for-FSLASTBLOCK-tag.patch +Patch28: 0028-libblkid-merge-FS-flags-into-one-FSINFO.patch +Patch29: 0029-libblkid-add-FSBLOCKSIZE-tag.patch +Patch30: 0030-libblkid-update-documentation-of-BLOCK_SIZE-tag.patch +# 2109459 - fix compiler warnings/errors +Patch31: 0031-cfdisk-don-t-use-NULL-in-printf-coverity-scan.patch +Patch32: 0032-zramctl-fix-compiler-warning-Werror-maybe-uninitiali.patch +Patch33: 0033-lib-path-make-ul_path_read_buffer-more-robust-coveri.patch +# 2094216 - lslogins reports incorrect "Password is locked" status +Patch34: 0034-lslogins-improve-for-static-analyzer.patch +# 2117203 - RHEL-9.1: loop-overlay test failed +Patch35: 0035-tests-add-udevadm-settle-to-loop-overlap-test.patch +# 2094216 - lslogins reports incorrect "Password is locked" status +Patch36: 0036-lslogins-support-more-password-methods.patch + %description The util-linux package contains a large variety of low-level system @@ -305,7 +343,7 @@ chfn and chsh utilities with dependence on libuser %prep -%autosetup -p1 -n %{name}-%{upstream_version} +%autosetup -p1 -Sgit -n %{name}-%{upstream_version} %build unset LINGUAS || : @@ -425,6 +463,11 @@ ln -sf ../proc/self/mounts %{buildroot}/etc/mtab # remove static libs rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a +# remove unsupported tools (--disable-* not avalable by ./configure) +rm -f ${RPM_BUILD_ROOT}%{_bindir}/uclampset +rm -f ${RPM_BUILD_ROOT}%{compldir}/uclampset +rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/uclampset* + # temporary remove to avoid conflicts with bash-completion pkg rm -f $RPM_BUILD_ROOT%{compldir}/{mount,umount} @@ -549,7 +592,6 @@ fi %{_bindir}/setarch %{_bindir}/setpriv %{_bindir}/setterm -%{_bindir}/uclampset %{_bindir}/ul %{_bindir}/utmpdump %{_bindir}/uuidgen @@ -591,7 +633,6 @@ fi %{_mandir}/man1/setpriv.1* %{_mandir}/man1/setterm.1* %{_mandir}/man1/su.1* -%{_mandir}/man1/uclampset.1.* %{_mandir}/man1/ul.1* %{_mandir}/man1/utmpdump.1.gz %{_mandir}/man1/uuidgen.1* @@ -721,7 +762,6 @@ fi %{compldir}/setterm %{compldir}/su %{compldir}/swaplabel -%{compldir}/uclampset %{compldir}/ul %{compldir}/utmpdump %{compldir}/uuidgen @@ -944,6 +984,32 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Aug 24 2022 Karel Zak 2.37.4-9 +- improve lslogins pasword validator (related #2094216) + +* Mon Aug 15 2022 Karel Zak 2.37.4-8 +- remove unnecessary patches (#2117203) + +* Fri Aug 12 2022 Karel Zak 2.37.4-7 +- improve loop overlay test (#2117203) + +* Wed Aug 10 2022 Karel Zak 2.37.4-6 +- fix #2094216 - lslogins reports incorrect "Password is locked" status +- fix #2117203 - loop-overlay test failed + +* Fri Jul 22 2022 Karel Zak 2.37.4-5 +- cleanup spec file build requiremnts + +* Thu Jul 21 2022 Karel Zak 2.37.4-4 +- fix #2079652 - remove uclampset, unsupported by RHEL kernel +- fix #2094216 - lslogins reports incorrect "Password is locked" status +- fix #2092943 - uuidd time based UUIDs are without MAC address +- fix #2074486 - wipefs to erase all available signatures against read only rom +- fix #2064810 - RFE: complete libblkid FSSIZE implementation +- fix #2078787 - Activity "lsirq -s column" produces wrong result i.e. not sorting properly. +- fix #2076829 - dmesg new option "--since" is not working if timestamp format is not provided +- fix #2109459 - fix compiler warnings/errors + * Thu Feb 24 2022 Karel Zak 2.37.4-3 - fix #2057046 - wdctl not picking up reboot reason flag