From d3d0e6dc70889e5fe9d9dfeab67e9ba1f0491a28 Mon Sep 17 00:00:00 2001
From: Andrey Albershteyn <aalbersh@redhat.com>
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 <aalbersh@redhat.com>
---
 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

