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/bkey_sort.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/bkey_sort.c')
-rw-r--r-- | fs/bcachefs/bkey_sort.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/bkey_sort.c b/fs/bcachefs/bkey_sort.c index 557a79cad986..cdef41db7692 100644 --- a/fs/bcachefs/bkey_sort.c +++ b/fs/bcachefs/bkey_sort.c @@ -46,7 +46,7 @@ static inline void sort_iter_advance(struct sort_iter *iter, sort_cmp_fn cmp) BUG_ON(!iter->used); - i->k = bkey_next(i->k); + i->k = bkey_p_next(i->k); BUG_ON(i->k > i->end); @@ -108,7 +108,7 @@ bch2_key_sort_fix_overlapping(struct bch_fs *c, struct bset *dst, !should_drop_next_key(iter)) { bkey_copy(out, k); btree_keys_account_key_add(&nr, 0, out); - out = bkey_next(out); + out = bkey_p_next(out); } sort_iter_advance(iter, key_sort_fix_overlapping_cmp); @@ -147,7 +147,7 @@ bch2_sort_repack(struct bset *dst, struct btree *src, out->needs_whiteout = false; btree_keys_account_key_add(&nr, 0, out); - out = bkey_next(out); + out = bkey_p_next(out); } dst->u64s = cpu_to_le16((u64 *) out - dst->_data); @@ -194,7 +194,7 @@ unsigned bch2_sort_keys(struct bkey_packed *dst, bkey_copy(out, in); } out->needs_whiteout |= needs_whiteout; - out = bkey_next(out); + out = bkey_p_next(out); } return (u64 *) out - (u64 *) dst; |