mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
New superblock fields for multiple cache devices
This commit is contained in:
parent
0b4b6fe2d3
commit
1a7ae034f6
5
bcache.h
5
bcache.h
@ -18,8 +18,11 @@ struct cache_sb {
|
||||
uint64_t nbuckets; /* device size */
|
||||
uint64_t btree_root;
|
||||
uint16_t btree_level;
|
||||
uint16_t _pad[3];
|
||||
uint16_t nr_in_set;
|
||||
uint16_t nr_this_dev;
|
||||
uint16_t _pad[1];
|
||||
uint8_t uuid[16];
|
||||
uint8_t set_uuid[16];
|
||||
};
|
||||
|
||||
struct bucket_disk {
|
||||
|
@ -76,6 +76,7 @@ int main(int argc, char **argv)
|
||||
struct cache_sb sb = { .block_size = 8, .bucket_size = 0 };
|
||||
|
||||
uuid_generate(sb.uuid);
|
||||
uuid_generate(sb.set_uuid);
|
||||
|
||||
while ((c = getopt(argc, argv, "CBU:w:b:")) != -1)
|
||||
switch (c) {
|
||||
@ -129,6 +130,7 @@ int main(int argc, char **argv)
|
||||
memcpy(sb.magic, bcache_magic, 16);
|
||||
sb.version = backingdev ? CACHE_BACKING_DEVICE : 0;
|
||||
sb.nbuckets = nblocks / sb.bucket_size;
|
||||
sb.nr_in_set = 1;
|
||||
uuid_unparse(sb.uuid, uuid);
|
||||
|
||||
do
|
||||
|
Loading…
Reference in New Issue
Block a user