dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone

Blame SOURCES/0038-libblkid-xfs-fix-sector-size-calculation.patch

1d474f
From 28b89361bf574af24c2f9c857d0e5f7c84e2787c Mon Sep 17 00:00:00 2001
1d474f
From: Karel Zak <kzak@redhat.com>
1d474f
Date: Tue, 3 Sep 2019 15:10:35 +0200
1d474f
Subject: [PATCH 38/40] libblkid: (xfs) fix sector size calculation
1d474f
1d474f
Reported-by: Anatoly Pugachev <matorola@gmail.com>
1d474f
Upstream: http://github.com/karelzak/util-linux/commit/2771d40b88660a11306aa5d4e200fc0ebebfe315
1d474f
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1817726
1d474f
Signed-off-by: Karel Zak <kzak@redhat.com>
1d474f
---
1d474f
 libblkid/src/superblocks/xfs.c | 2 +-
1d474f
 1 file changed, 1 insertion(+), 1 deletion(-)
1d474f
1d474f
diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c
1d474f
index eb513ac3e..98e59ff7c 100644
1d474f
--- a/libblkid/src/superblocks/xfs.c
1d474f
+++ b/libblkid/src/superblocks/xfs.c
1d474f
@@ -173,7 +173,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag)
1d474f
 		blkid_probe_set_label(pr, (unsigned char *) xs->sb_fname,
1d474f
 				sizeof(xs->sb_fname));
1d474f
 	blkid_probe_set_uuid(pr, xs->sb_uuid);
1d474f
-	blkid_probe_set_block_size(pr, xs->sb_sectsize * 256);
1d474f
+	blkid_probe_set_block_size(pr, be16_to_cpu(xs->sb_sectsize));
1d474f
 	return 0;
1d474f
 }
1d474f
 
1d474f
-- 
1d474f
2.25.4
1d474f