123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- #ifndef _LINUX_DM_BITSET_H
- #define _LINUX_DM_BITSET_H
- #include "dm-array.h"
- struct dm_disk_bitset {
- struct dm_array_info array_info;
- uint32_t current_index;
- uint64_t current_bits;
- bool current_index_set:1;
- bool dirty:1;
- };
- void dm_disk_bitset_init(struct dm_transaction_manager *tm,
- struct dm_disk_bitset *info);
- int dm_bitset_empty(struct dm_disk_bitset *info, dm_block_t *new_root);
- int dm_bitset_resize(struct dm_disk_bitset *info, dm_block_t old_root,
- uint32_t old_nr_entries, uint32_t new_nr_entries,
- bool default_value, dm_block_t *new_root);
- int dm_bitset_del(struct dm_disk_bitset *info, dm_block_t root);
- int dm_bitset_set_bit(struct dm_disk_bitset *info, dm_block_t root,
- uint32_t index, dm_block_t *new_root);
- int dm_bitset_clear_bit(struct dm_disk_bitset *info, dm_block_t root,
- uint32_t index, dm_block_t *new_root);
- int dm_bitset_test_bit(struct dm_disk_bitset *info, dm_block_t root,
- uint32_t index, dm_block_t *new_root, bool *result);
- int dm_bitset_flush(struct dm_disk_bitset *info, dm_block_t root,
- dm_block_t *new_root);
- #endif
|