From: Thomas Weißschuh Date: Fri, 10 Feb 2023 03:37:48 +0000 (+0000) Subject: libblkid: bcachefs: fix new magic detection X-Git-Tag: v2.39-rc1~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=baf872304ef94d4ed5c0d7d3a9c849ca15c1b18c;p=thirdparty%2Futil-linux.git libblkid: bcachefs: fix new magic detection The new bcache-specific magic value was wrong and the new testcase didn't actually use this magic. Signed-off-by: Thomas Weißschuh --- diff --git a/libblkid/src/superblocks/bcache.c b/libblkid/src/superblocks/bcache.c index 1d6ee95190..7e8d78db53 100644 --- a/libblkid/src/superblocks/bcache.c +++ b/libblkid/src/superblocks/bcache.c @@ -91,7 +91,7 @@ struct bcachefs_super_block { /* magic string */ #define BCACHE_SB_MAGIC "\xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81" -#define BCACHEFS_SB_MAGIC "\x18\x00\x18\x00\x00\x00\x00\x00\xc6\x85\x73\xf6\x4e\x1a\x45\xca" +#define BCACHEFS_SB_MAGIC "\xc6\x85\x73\xf6\x66\xce\x90\xa9\xd9\x6a\x60\xcf\x80\x3d\xf7\xef" /* magic string len */ #define BCACHE_SB_MAGIC_LEN (sizeof(BCACHE_SB_MAGIC) - 1) /* super block offset */ diff --git a/tests/expected/blkid/low-probe-bcachefs-2 b/tests/expected/blkid/low-probe-bcachefs-2 index 7f053b2c1a..4a6d664c09 100644 --- a/tests/expected/blkid/low-probe-bcachefs-2 +++ b/tests/expected/blkid/low-probe-bcachefs-2 @@ -7,6 +7,6 @@ ID_FS_TYPE=bcachefs ID_FS_USAGE=filesystem ID_FS_UUID=4fa11b1e-75e6-4210-9167-34e1769c0fe1 ID_FS_UUID_ENC=4fa11b1e-75e6-4210-9167-34e1769c0fe1 -ID_FS_UUID_SUB=11c0fad3-ce13-4c57-b18b-c6349d75fcdd -ID_FS_UUID_SUB_ENC=11c0fad3-ce13-4c57-b18b-c6349d75fcdd -ID_FS_VERSION=24 +ID_FS_UUID_SUB=0a3643b7-c515-47f8-a0ea-91fc38d043d1 +ID_FS_UUID_SUB_ENC=0a3643b7-c515-47f8-a0ea-91fc38d043d1 +ID_FS_VERSION=26 diff --git a/tests/ts/blkid/images-fs/bcachefs-2.img.xz b/tests/ts/blkid/images-fs/bcachefs-2.img.xz index 21031703ec..e796c974cb 100644 Binary files a/tests/ts/blkid/images-fs/bcachefs-2.img.xz and b/tests/ts/blkid/images-fs/bcachefs-2.img.xz differ