Lines Matching +full:- +full:- +full:root

1 /* SPDX-License-Identifier: GPL-2.0-only */
10 #include "dm-array.h"
12 /*----------------------------------------------------------------*/
19 * Like the dm-array that it's based on, the caller needs to keep track of
20 * the size of the bitset separately. The underlying dm-array implicitly
21 * knows how many words it's storing and will return -ENODATA if you try
34 * b) Get yourself a root. The root is the index of a block of data on the
36 * pre existing root in your metadata that you wish to use, or you may
41 * root for a _new_ array. If you've incremented the old root, via
43 * it in parallel with the new root.
46 * return a root for a new, updated bitset.
82 * tm - the transaction manager that should supervise this structure
83 * info - the structure being initialised
91 * info - describes the bitset
92 * new_root - on success, points to the new root block
102 * info - describes the array
103 * root - the root block of the array on disk
104 * size - the number of entries in the array
105 * fn - the callback
106 * context - passed to the callback
109 int dm_bitset_new(struct dm_disk_bitset *info, dm_block_t *root,
115 * info - describes the bitset
116 * old_root - the root block of the array on disk
117 * old_nr_entries - the number of bits in the old bitset
118 * new_nr_entries - the number of bits you want in the new bitset
119 * default_value - the value for any new bits
120 * new_root - on success, points to the new root block
129 int dm_bitset_del(struct dm_disk_bitset *info, dm_block_t root);
134 * info - describes the bitset
135 * root - the root block of the bitset
136 * index - the bit index
137 * new_root - on success, points to the new root block
139 * -ENODATA will be returned if the index is out of bounds.
141 int dm_bitset_set_bit(struct dm_disk_bitset *info, dm_block_t root,
147 * info - describes the bitset
148 * root - the root block of the bitset
149 * index - the bit index
150 * new_root - on success, points to the new root block
152 * -ENODATA will be returned if the index is out of bounds.
154 int dm_bitset_clear_bit(struct dm_disk_bitset *info, dm_block_t root,
160 * info - describes the bitset
161 * root - the root block of the bitset
162 * index - the bit index
163 * new_root - on success, points to the new root block (cached values may have been written)
164 * result - the bit value you're after
166 * -ENODATA will be returned if the index is out of bounds.
168 int dm_bitset_test_bit(struct dm_disk_bitset *info, dm_block_t root,
174 * info - describes the bitset
175 * root - the root block of the bitset
176 * new_root - on success, points to the new root block
178 int dm_bitset_flush(struct dm_disk_bitset *info, dm_block_t root,
192 * Make sure you've flush any dm_disk_bitset and updated the root before
196 dm_block_t root, uint32_t nr_entries,
204 /*----------------------------------------------------------------*/