bcache: Pull on disk data structures out into a separate header
Now, the on disk data structures are in a header that can be exported to userspace - and having them all centralized is nice too. Signed-off-by: Kent Overstreet <kmo@daterainc.com>
This commit is contained in:
@@ -684,7 +684,7 @@ void bch_bset_init_next(struct btree *b)
|
||||
} else
|
||||
get_random_bytes(&i->seq, sizeof(uint64_t));
|
||||
|
||||
i->magic = bset_magic(b->c);
|
||||
i->magic = bset_magic(&b->c->sb);
|
||||
i->version = 0;
|
||||
i->keys = 0;
|
||||
|
||||
@@ -1034,7 +1034,7 @@ static void __btree_sort(struct btree *b, struct btree_iter *iter,
|
||||
* memcpy()
|
||||
*/
|
||||
|
||||
out->magic = bset_magic(b->c);
|
||||
out->magic = bset_magic(&b->c->sb);
|
||||
out->seq = b->sets[0].data->seq;
|
||||
out->version = b->sets[0].data->version;
|
||||
swap(out, b->sets[0].data);
|
||||
|
Reference in New Issue
Block a user