4 static const char bcache_magic[] = {
5 0xc6, 0x85, 0x73, 0xf6, 0x4e, 0x1a, 0x45, 0xca,
6 0x82, 0x65, 0xf5, 0x7f, 0x48, 0xba, 0x6d, 0x81 };
9 #define SB_LABEL_SIZE 32
13 uint64_t offset; /* sector where this sb was written */
15 #define CACHE_BACKING_DEV 1
24 uint8_t label[SB_LABEL_SIZE];
30 uint64_t nbuckets; /* device size */
31 uint16_t block_size; /* sectors */
32 uint16_t bucket_size; /* sectors */
37 uint32_t last_mount; /* time_t */
39 uint16_t first_bucket;
40 uint16_t keys; /* number of journal buckets */
41 uint64_t d[]; /* journal buckets */
44 inline uint64_t crc64(const void *_data, size_t len);
46 #define node(i, j) ((void *) ((i)->d + (j)))
47 #define end(i) node(i, (i)->keys)
50 crc64(((void *) (i)) + 8, ((void *) end(i)) - (((void *) (i)) + 8))