diff options
Diffstat (limited to 'drivers/md/persistent-data/dm-btree-internal.h')
-rw-r--r-- | drivers/md/persistent-data/dm-btree-internal.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/md/persistent-data/dm-btree-internal.h b/drivers/md/persistent-data/dm-btree-internal.h index 5709bfeab1e8..accbb05f17b6 100644 --- a/drivers/md/persistent-data/dm-btree-internal.h +++ b/drivers/md/persistent-data/dm-btree-internal.h | |||
@@ -36,13 +36,13 @@ struct node_header { | |||
36 | __le32 padding; | 36 | __le32 padding; |
37 | } __packed; | 37 | } __packed; |
38 | 38 | ||
39 | struct node { | 39 | struct btree_node { |
40 | struct node_header header; | 40 | struct node_header header; |
41 | __le64 keys[0]; | 41 | __le64 keys[0]; |
42 | } __packed; | 42 | } __packed; |
43 | 43 | ||
44 | 44 | ||
45 | void inc_children(struct dm_transaction_manager *tm, struct node *n, | 45 | void inc_children(struct dm_transaction_manager *tm, struct btree_node *n, |
46 | struct dm_btree_value_type *vt); | 46 | struct dm_btree_value_type *vt); |
47 | 47 | ||
48 | int new_block(struct dm_btree_info *info, struct dm_block **result); | 48 | int new_block(struct dm_btree_info *info, struct dm_block **result); |
@@ -64,7 +64,7 @@ struct ro_spine { | |||
64 | void init_ro_spine(struct ro_spine *s, struct dm_btree_info *info); | 64 | void init_ro_spine(struct ro_spine *s, struct dm_btree_info *info); |
65 | int exit_ro_spine(struct ro_spine *s); | 65 | int exit_ro_spine(struct ro_spine *s); |
66 | int ro_step(struct ro_spine *s, dm_block_t new_child); | 66 | int ro_step(struct ro_spine *s, dm_block_t new_child); |
67 | struct node *ro_node(struct ro_spine *s); | 67 | struct btree_node *ro_node(struct ro_spine *s); |
68 | 68 | ||
69 | struct shadow_spine { | 69 | struct shadow_spine { |
70 | struct dm_btree_info *info; | 70 | struct dm_btree_info *info; |
@@ -98,17 +98,17 @@ int shadow_root(struct shadow_spine *s); | |||
98 | /* | 98 | /* |
99 | * Some inlines. | 99 | * Some inlines. |
100 | */ | 100 | */ |
101 | static inline __le64 *key_ptr(struct node *n, uint32_t index) | 101 | static inline __le64 *key_ptr(struct btree_node *n, uint32_t index) |
102 | { | 102 | { |
103 | return n->keys + index; | 103 | return n->keys + index; |
104 | } | 104 | } |
105 | 105 | ||
106 | static inline void *value_base(struct node *n) | 106 | static inline void *value_base(struct btree_node *n) |
107 | { | 107 | { |
108 | return &n->keys[le32_to_cpu(n->header.max_entries)]; | 108 | return &n->keys[le32_to_cpu(n->header.max_entries)]; |
109 | } | 109 | } |
110 | 110 | ||
111 | static inline void *value_ptr(struct node *n, uint32_t index) | 111 | static inline void *value_ptr(struct btree_node *n, uint32_t index) |
112 | { | 112 | { |
113 | uint32_t value_size = le32_to_cpu(n->header.value_size); | 113 | uint32_t value_size = le32_to_cpu(n->header.value_size); |
114 | return value_base(n) + (value_size * index); | 114 | return value_base(n) + (value_size * index); |
@@ -117,7 +117,7 @@ static inline void *value_ptr(struct node *n, uint32_t index) | |||
117 | /* | 117 | /* |
118 | * Assumes the values are suitably-aligned and converts to core format. | 118 | * Assumes the values are suitably-aligned and converts to core format. |
119 | */ | 119 | */ |
120 | static inline uint64_t value64(struct node *n, uint32_t index) | 120 | static inline uint64_t value64(struct btree_node *n, uint32_t index) |
121 | { | 121 | { |
122 | __le64 *values_le = value_base(n); | 122 | __le64 *values_le = value_base(n); |
123 | 123 | ||
@@ -127,7 +127,7 @@ static inline uint64_t value64(struct node *n, uint32_t index) | |||
127 | /* | 127 | /* |
128 | * Searching for a key within a single node. | 128 | * Searching for a key within a single node. |
129 | */ | 129 | */ |
130 | int lower_bound(struct node *n, uint64_t key); | 130 | int lower_bound(struct btree_node *n, uint64_t key); |
131 | 131 | ||
132 | extern struct dm_block_validator btree_node_validator; | 132 | extern struct dm_block_validator btree_node_validator; |
133 | 133 | ||