]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: (bcache) report block size
authorThomas Weißschuh <thomas@t-8ch.de>
Sat, 3 Jun 2023 11:49:18 +0000 (13:49 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sat, 3 Jun 2023 11:51:36 +0000 (13:51 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
libblkid/src/superblocks/bcache.c
tests/expected/blkid/low-probe-bcache-B
tests/expected/blkid/low-probe-bcache-C
tests/expected/blkid/low-probe-bcache-journal

index a4a33614a3924eb93153f09f052e3e6709eaaeb5..bf7fed01fe46f3e695037529bb126ddb34bc41cf 100644 (file)
@@ -194,6 +194,9 @@ static int probe_bcache (blkid_probe pr, const struct blkid_idmag *mag)
        if (blkid_probe_set_label(pr, bcs->label, sizeof(bcs->label)) < 0)
                return BLKID_PROBE_NONE;
 
+       if (blkid_probe_set_block_size(pr, le16_to_cpu(bcs->block_size) * 512))
+               return BLKID_PROBE_NONE;
+
        blkid_probe_set_wiper(pr, 0, BCACHE_SB_OFF);
 
        return BLKID_PROBE_OK;
index 65932092524cb40e4960960ff7abe8b1887353df..2753678bf9bd9c75a37c4b718ec60a5938c73b61 100644 (file)
@@ -1,3 +1,4 @@
+ID_FS_BLOCK_SIZE=4096
 ID_FS_TYPE=bcache
 ID_FS_USAGE=other
 ID_FS_UUID=8fb7f716-4c19-4517-bfbb-6f4a2becad60
index 2188211b8427357c0386a1a8b533d47a7bdd8796..da4b31423005bf482690cd8b8a6ab0dd4aaf97a6 100644 (file)
@@ -1,3 +1,4 @@
+ID_FS_BLOCK_SIZE=4096
 ID_FS_TYPE=bcache
 ID_FS_USAGE=other
 ID_FS_UUID=7a343627-ac87-4bf0-b76f-46067cbc9b8c
index 966c3eff1f6816627174f1912cad96df9e0779a0..cfff870c0741d1f745aa9a6a2484d3541bad1731 100644 (file)
@@ -1,3 +1,4 @@
+ID_FS_BLOCK_SIZE=4096
 ID_FS_LABEL=journal-cache
 ID_FS_LABEL_ENC=journal-cache
 ID_FS_TYPE=bcache