From: Thomas Weißschuh Date: Sat, 3 Jun 2023 11:49:18 +0000 (+0200) Subject: libblkid: (bcache) report block size X-Git-Tag: v2.40-rc1~405^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bd80748620a75a34a4788535f89be37dbdeaab3;p=thirdparty%2Futil-linux.git libblkid: (bcache) report block size Signed-off-by: Thomas Weißschuh --- diff --git a/libblkid/src/superblocks/bcache.c b/libblkid/src/superblocks/bcache.c index a4a33614a3..bf7fed01fe 100644 --- a/libblkid/src/superblocks/bcache.c +++ b/libblkid/src/superblocks/bcache.c @@ -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; diff --git a/tests/expected/blkid/low-probe-bcache-B b/tests/expected/blkid/low-probe-bcache-B index 6593209252..2753678bf9 100644 --- a/tests/expected/blkid/low-probe-bcache-B +++ b/tests/expected/blkid/low-probe-bcache-B @@ -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 diff --git a/tests/expected/blkid/low-probe-bcache-C b/tests/expected/blkid/low-probe-bcache-C index 2188211b84..da4b314230 100644 --- a/tests/expected/blkid/low-probe-bcache-C +++ b/tests/expected/blkid/low-probe-bcache-C @@ -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 diff --git a/tests/expected/blkid/low-probe-bcache-journal b/tests/expected/blkid/low-probe-bcache-journal index 966c3eff1f..cfff870c07 100644 --- a/tests/expected/blkid/low-probe-bcache-journal +++ b/tests/expected/blkid/low-probe-bcache-journal @@ -1,3 +1,4 @@ +ID_FS_BLOCK_SIZE=4096 ID_FS_LABEL=journal-cache ID_FS_LABEL_ENC=journal-cache ID_FS_TYPE=bcache