]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: bcachefs: fix new magic detection
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 10 Feb 2023 03:37:48 +0000 (03:37 +0000)
committerThomas Weißschuh <thomas@t-8ch.de>
Fri, 10 Feb 2023 03:41:11 +0000 (03:41 +0000)
The new bcache-specific magic value was wrong and the new testcase
didn't actually use this magic.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
libblkid/src/superblocks/bcache.c
tests/expected/blkid/low-probe-bcachefs-2
tests/ts/blkid/images-fs/bcachefs-2.img.xz

index 1d6ee95190950ea0e69a155659c8f05127919a53..7e8d78db533fdca7a72553ee14d06af596deac1c 100644 (file)
@@ -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 */
index 7f053b2c1a2b3346d06d4406088d620af5451f1e..4a6d664c098fed3eb75c7c50a7196ed7efe6268a 100644 (file)
@@ -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
index 21031703ec12a602a759cba138863f0ef3579b57..e796c974cbc90c349d649911e48804773b91f5d9 100644 (file)
Binary files a/tests/ts/blkid/images-fs/bcachefs-2.img.xz and b/tests/ts/blkid/images-fs/bcachefs-2.img.xz differ