mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 23:29:46 +00:00
bcachefs: bcachefs_format.h should be using __u64
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
a0f8faea5f
commit
a5cf5a4b41
@ -695,7 +695,7 @@ struct bch_reservation {
|
|||||||
/* Maximum size (in u64s) a single pointer could be: */
|
/* Maximum size (in u64s) a single pointer could be: */
|
||||||
#define BKEY_EXTENT_PTR_U64s_MAX\
|
#define BKEY_EXTENT_PTR_U64s_MAX\
|
||||||
((sizeof(struct bch_extent_crc128) + \
|
((sizeof(struct bch_extent_crc128) + \
|
||||||
sizeof(struct bch_extent_ptr)) / sizeof(u64))
|
sizeof(struct bch_extent_ptr)) / sizeof(__u64))
|
||||||
|
|
||||||
/* Maximum possible size of an entire extent value: */
|
/* Maximum possible size of an entire extent value: */
|
||||||
#define BKEY_EXTENT_VAL_U64s_MAX \
|
#define BKEY_EXTENT_VAL_U64s_MAX \
|
||||||
@ -707,7 +707,7 @@ struct bch_reservation {
|
|||||||
/* Btree pointers don't carry around checksums: */
|
/* Btree pointers don't carry around checksums: */
|
||||||
#define BKEY_BTREE_PTR_VAL_U64s_MAX \
|
#define BKEY_BTREE_PTR_VAL_U64s_MAX \
|
||||||
((sizeof(struct bch_btree_ptr_v2) + \
|
((sizeof(struct bch_btree_ptr_v2) + \
|
||||||
sizeof(struct bch_extent_ptr) * BCH_REPLICAS_MAX) / sizeof(u64))
|
sizeof(struct bch_extent_ptr) * BCH_REPLICAS_MAX) / sizeof(__u64))
|
||||||
#define BKEY_BTREE_PTR_U64s_MAX \
|
#define BKEY_BTREE_PTR_U64s_MAX \
|
||||||
(BKEY_U64s + BKEY_BTREE_PTR_VAL_U64s_MAX)
|
(BKEY_U64s + BKEY_BTREE_PTR_VAL_U64s_MAX)
|
||||||
|
|
||||||
@ -749,7 +749,7 @@ struct bch_inode_v3 {
|
|||||||
} __packed __aligned(8);
|
} __packed __aligned(8);
|
||||||
|
|
||||||
#define INODEv3_FIELDS_START_INITIAL 6
|
#define INODEv3_FIELDS_START_INITIAL 6
|
||||||
#define INODEv3_FIELDS_START_CUR (offsetof(struct bch_inode_v3, fields) / sizeof(u64))
|
#define INODEv3_FIELDS_START_CUR (offsetof(struct bch_inode_v3, fields) / sizeof(__u64))
|
||||||
|
|
||||||
struct bch_inode_generation {
|
struct bch_inode_generation {
|
||||||
struct bch_val v;
|
struct bch_val v;
|
||||||
@ -916,7 +916,7 @@ struct bch_dirent {
|
|||||||
#define DT_SUBVOL 16
|
#define DT_SUBVOL 16
|
||||||
#define BCH_DT_MAX 17
|
#define BCH_DT_MAX 17
|
||||||
|
|
||||||
#define BCH_NAME_MAX ((unsigned) (U8_MAX * sizeof(u64) - \
|
#define BCH_NAME_MAX ((unsigned) (U8_MAX * sizeof(__u64) - \
|
||||||
sizeof(struct bkey) - \
|
sizeof(struct bkey) - \
|
||||||
offsetof(struct bch_dirent, d_name)))
|
offsetof(struct bch_dirent, d_name)))
|
||||||
|
|
||||||
@ -1009,7 +1009,7 @@ struct bch_alloc_v4 {
|
|||||||
} __packed __aligned(8);
|
} __packed __aligned(8);
|
||||||
|
|
||||||
#define BCH_ALLOC_V4_U64s_V0 6
|
#define BCH_ALLOC_V4_U64s_V0 6
|
||||||
#define BCH_ALLOC_V4_U64s (sizeof(struct bch_alloc_v4) / sizeof(u64))
|
#define BCH_ALLOC_V4_U64s (sizeof(struct bch_alloc_v4) / sizeof(__u64))
|
||||||
|
|
||||||
BITMASK(BCH_ALLOC_V4_NEED_DISCARD, struct bch_alloc_v4, flags, 0, 1)
|
BITMASK(BCH_ALLOC_V4_NEED_DISCARD, struct bch_alloc_v4, flags, 0, 1)
|
||||||
BITMASK(BCH_ALLOC_V4_NEED_INC_GEN, struct bch_alloc_v4, flags, 1, 2)
|
BITMASK(BCH_ALLOC_V4_NEED_INC_GEN, struct bch_alloc_v4, flags, 1, 2)
|
||||||
@ -1289,10 +1289,10 @@ struct bch_key {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define BCH_KEY_MAGIC \
|
#define BCH_KEY_MAGIC \
|
||||||
(((u64) 'b' << 0)|((u64) 'c' << 8)| \
|
(((__u64) 'b' << 0)|((__u64) 'c' << 8)| \
|
||||||
((u64) 'h' << 16)|((u64) '*' << 24)| \
|
((__u64) 'h' << 16)|((__u64) '*' << 24)| \
|
||||||
((u64) '*' << 32)|((u64) 'k' << 40)| \
|
((__u64) '*' << 32)|((__u64) 'k' << 40)| \
|
||||||
((u64) 'e' << 48)|((u64) 'y' << 56))
|
((__u64) 'e' << 48)|((__u64) 'y' << 56))
|
||||||
|
|
||||||
struct bch_encrypted_key {
|
struct bch_encrypted_key {
|
||||||
__le64 magic;
|
__le64 magic;
|
||||||
@ -2272,7 +2272,7 @@ static inline __u64 BTREE_NODE_ID(struct btree_node *n)
|
|||||||
return BTREE_NODE_ID_LO(n) | (BTREE_NODE_ID_HI(n) << 4);
|
return BTREE_NODE_ID_LO(n) | (BTREE_NODE_ID_HI(n) << 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void SET_BTREE_NODE_ID(struct btree_node *n, u64 v)
|
static inline void SET_BTREE_NODE_ID(struct btree_node *n, __u64 v)
|
||||||
{
|
{
|
||||||
SET_BTREE_NODE_ID_LO(n, v);
|
SET_BTREE_NODE_ID_LO(n, v);
|
||||||
SET_BTREE_NODE_ID_HI(n, v >> 4);
|
SET_BTREE_NODE_ID_HI(n, v >> 4);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user