diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-06 22:47:42 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:06 -0400 |
commit | 73bd774d28d2b2e6a05c31bf7afb9247e02a8e49 (patch) | |
tree | 21ab80d4b966d92647ea178bc5707a8534e5d123 /fs/bcachefs/btree_io.h | |
parent | 236b68da5017b5336b332f941323a5bc450594b3 (diff) |
bcachefs: Assorted sparse fixes
- endianness fixes
- mark some things static
- fix a few __percpu annotations
- fix silent enum conversions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_io.h')
-rw-r--r-- | fs/bcachefs/btree_io.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/btree_io.h b/fs/bcachefs/btree_io.h index c43fb60b8c82..0cadf651e7cf 100644 --- a/fs/bcachefs/btree_io.h +++ b/fs/bcachefs/btree_io.h @@ -178,7 +178,7 @@ static inline void compat_bformat(unsigned level, enum btree_id btree_id, f->field_offset[BKEY_FIELD_SNAPSHOT] = write ? 0 - : U32_MAX - max_packed; + : cpu_to_le64(U32_MAX - max_packed); } } @@ -200,7 +200,7 @@ static inline void compat_btree_node(unsigned level, enum btree_id btree_id, struct btree_node *bn) { if (version < bcachefs_metadata_version_inode_btree_change && - btree_node_type_is_extents(btree_id) && + btree_id_is_extents(btree_id) && !bpos_eq(bn->min_key, POS_MIN) && write) bn->min_key = bpos_nosnap_predecessor(bn->min_key); @@ -217,7 +217,7 @@ static inline void compat_btree_node(unsigned level, enum btree_id btree_id, bn->max_key.snapshot = U32_MAX; if (version < bcachefs_metadata_version_inode_btree_change && - btree_node_type_is_extents(btree_id) && + btree_id_is_extents(btree_id) && !bpos_eq(bn->min_key, POS_MIN) && !write) bn->min_key = bpos_nosnap_successor(bn->min_key); |