auto id = e.bdev;
bool fail = false;
ceph_assert(id < dev_count);
- apply(e.offset, e.length, alloc_size[id], owned_blocks[id],
+ apply_for_bitset_range(e.offset, e.length, alloc_size[id], owned_blocks[id],
[&](uint64_t pos, boost::dynamic_bitset<uint64_t> &bs) {
ceph_assert(pos < bs.size());
if (!bs.test(pos)) {
return -EFAULT;
}
- apply(e.offset, e.length, alloc_size[id], used_blocks[id],
+ apply_for_bitset_range(e.offset, e.length, alloc_size[id], used_blocks[id],
[&](uint64_t pos, boost::dynamic_bitset<uint64_t> &bs) {
ceph_assert(pos < bs.size());
if (bs.test(pos)) {
if (cct->_conf->bluefs_log_replay_check_allocations) {
bool fail = false;
- apply(offset, length, alloc_size[id], owned_blocks[id],
+ apply_for_bitset_range(offset, length, alloc_size[id], owned_blocks[id],
[&](uint64_t pos, boost::dynamic_bitset<uint64_t> &bs) {
ceph_assert(pos < bs.size());
if (bs.test(pos)) {
<< std::dec << ": already given" << dendl;
return -EFAULT;
}
- apply(offset, length, alloc_size[id], used_blocks[id],
+ apply_for_bitset_range(offset, length, alloc_size[id], used_blocks[id],
[&](uint64_t pos, boost::dynamic_bitset<uint64_t> &bs) {
ceph_assert(pos < bs.size());
alloc[id]->init_rm_free(offset, length);
if (cct->_conf->bluefs_log_replay_check_allocations) {
bool fail = false;
- apply(offset, length, alloc_size[id], owned_blocks[id],
+ apply_for_bitset_range(offset, length, alloc_size[id], owned_blocks[id],
[&](uint64_t pos, boost::dynamic_bitset<uint64_t> &bs) {
ceph_assert(pos < bs.size());
if (!bs.test(pos)) {
return -EFAULT;
}
- apply(offset, length, alloc_size[id], used_blocks[id],
+ apply_for_bitset_range(offset, length, alloc_size[id], used_blocks[id],
[&](uint64_t pos, boost::dynamic_bitset<uint64_t> &bs) {
ceph_assert(pos < bs.size());
if (bs.test(pos)) {
auto& fnode_extents = f->fnode.extents;
for (auto e : fnode_extents) {
auto id = e.bdev;
- apply(e.offset, e.length, alloc_size[id], used_blocks[id],
+ apply_for_bitset_range(e.offset, e.length, alloc_size[id], used_blocks[id],
[&](uint64_t pos, boost::dynamic_bitset<uint64_t> &bs) {
ceph_assert(pos < bs.size());
ceph_assert(bs.test(pos));
for (auto e : fnode_extents) {
auto id = e.bdev;
bool fail = false;
- apply(e.offset, e.length, alloc_size[id], owned_blocks[id],
+ apply_for_bitset_range(e.offset, e.length, alloc_size[id], owned_blocks[id],
[&](uint64_t pos, boost::dynamic_bitset<uint64_t> &bs) {
ceph_assert(pos < bs.size());
if (!bs.test(pos)) {
return -EFAULT;
}
- apply(e.offset, e.length, alloc_size[id], used_blocks[id],
+ apply_for_bitset_range(e.offset, e.length, alloc_size[id], used_blocks[id],
[&](uint64_t pos, boost::dynamic_bitset<uint64_t> &bs) {
ceph_assert(pos < bs.size());
if (!bs.test(pos)) {
}
if (depth != FSCK_SHALLOW) {
bool already = false;
- apply(
+ apply_for_bitset_range(
e.offset, e.length, granularity, used_blocks,
[&](uint64_t pos, mempool_dynamic_bitset &bs) {
ceph_assert(pos < bs.size());
_fsck_collections(&errors);
used_blocks.resize(fm->get_alloc_units());
- apply(
+ apply_for_bitset_range(
0, std::max<uint64_t>(min_alloc_size, SUPER_RESERVED), fm->get_alloc_size(), used_blocks,
[&](uint64_t pos, mempool_dynamic_bitset &bs) {
ceph_assert(pos < bs.size());
}
for (auto e = bluefs_extents.begin(); e != bluefs_extents.end(); ++e) {
- apply(
+ apply_for_bitset_range(
e.get_start(), e.get_len(), fm->get_alloc_size(), used_blocks,
[&](uint64_t pos, mempool_dynamic_bitset &bs) {
ceph_assert(pos < bs.size());
<< " ops " << wt.ops.size()
<< " released 0x" << std::hex << wt.released << std::dec << dendl;
for (auto e = wt.released.begin(); e != wt.released.end(); ++e) {
- apply(
+ apply_for_bitset_range(
e.get_start(), e.get_len(), fm->get_alloc_size(), used_blocks,
[&](uint64_t pos, mempool_dynamic_bitset &bs) {
ceph_assert(pos < bs.size());
// remove bluefs_extents from used set since the freelist doesn't
// know they are allocated.
for (auto e = bluefs_extents.begin(); e != bluefs_extents.end(); ++e) {
- apply(
+ apply_for_bitset_range(
e.get_start(), e.get_len(), fm->get_alloc_size(), used_blocks,
[&](uint64_t pos, mempool_dynamic_bitset &bs) {
ceph_assert(pos < bs.size());
uint64_t offset, length;
while (fm->enumerate_next(db, &offset, &length)) {
bool intersects = false;
- apply(
+ apply_for_bitset_range(
offset, length, fm->get_alloc_size(), used_blocks,
[&](uint64_t pos, mempool_dynamic_bitset &bs) {
ceph_assert(pos < bs.size());