- while (hdr) {
- nxt = hdr_nxt(pool, hdr);
- if (!nxt)
- break;
- if (hdr_free(nxt) && hdr_free(hdr)) {
- merge(pool, hdr, nxt);
- compacted++;
- continue;
- }
- hdr = hdr_nxt(pool, hdr);
- }
+static void set_blocks(struct pool *pool, unsigned int pool_idx,
+ unsigned int idx, unsigned int nr_blocks)
+{
+ blocks_iter(pool, pool_idx, idx, nr_blocks, mask_set);
+}
+
+static void clear_blocks(struct pool *pool, unsigned int pool_idx,
+ unsigned int idx, unsigned int nr_blocks)
+{
+ blocks_iter(pool, pool_idx, idx, nr_blocks, mask_clear);
+}