diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-04 23:05:55 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:55 -0400 |
commit | ac2ccddc2689d5889fd1520383738b60dbafc1d0 (patch) | |
tree | c090c0f7749633a7d03ba3790fc2f9ec1b396318 /fs/bcachefs/recovery.c | |
parent | 45dd05b3ecc371560f9e36e4b57295ee338ee879 (diff) |
bcachefs: Drop some anonymous structs, unions
Rust bindgen doesn't cope well with anonymous structs and unions. This
patch drops the fancy anonymous structs & unions in bkey_i that let us
use the same helpers for bkey_i and bkey_packed; since bkey_packed is an
internal type that's never exposed to outside code, it's only a minor
inconvenienc.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r-- | fs/bcachefs/recovery.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index f5946b4dbce2..aafe4054d25d 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -481,7 +481,7 @@ static int journal_keys_sort(struct bch_fs *c) struct genradix_iter iter; struct journal_replay *i, **_i; struct jset_entry *entry; - struct bkey_i *k, *_n; + struct bkey_i *k; struct journal_keys *keys = &c->journal_keys; struct journal_key *src, *dst; size_t nr_keys = 0; @@ -492,7 +492,7 @@ static int journal_keys_sort(struct bch_fs *c) if (!i || i->ignore) continue; - for_each_jset_key(k, _n, entry, &i->j) + for_each_jset_key(k, entry, &i->j) nr_keys++; } @@ -511,7 +511,7 @@ static int journal_keys_sort(struct bch_fs *c) if (!i || i->ignore) continue; - for_each_jset_key(k, _n, entry, &i->j) + for_each_jset_key(k, entry, &i->j) keys->d[keys->nr++] = (struct journal_key) { .btree_id = entry->btree_id, .level = entry->level, @@ -871,7 +871,7 @@ static int verify_superblock_clean(struct bch_fs *c, IS_ERR(k1) || IS_ERR(k2) || k1->k.u64s != k2->k.u64s || - memcmp(k1, k2, bkey_bytes(k1)) || + memcmp(k1, k2, bkey_bytes(&k1->k)) || l1 != l2, c, "superblock btree root %u doesn't match journal after clean shutdown\n" "sb: l=%u %s\n" |