auto prealloc_pos = prealloc.begin();
for (auto& wi : wctx->writes) {
- BlobRef b = wi.b;
- bluestore_blob_t& dblob = b->dirty_blob();
+ bluestore_blob_t& dblob = wi.b->dirty_blob();
uint64_t b_off = wi.b_off;
bufferlist *l = &wi.bl;
uint64_t final_length = wi.blob_length;
l = &wi.compressed_bl;
dblob.set_compressed(wi.blob_length, wi.compressed_len);
if (csum != Checksummer::CSUM_NONE) {
- dout(20) << __func__ << " initialize csum setting for compressed blob " << *b
+ dout(20) << __func__
+ << " initialize csum setting for compressed blob " << *wi.b
<< " csum_type " << Checksummer::get_csum_type_string(csum)
<< " csum_order " << csum_order
<< " csum_length 0x" << std::hex << csum_length
b_off = suggested_boff;
}
if (csum != Checksummer::CSUM_NONE) {
- dout(20) << __func__ << " initialize csum setting for new blob " << *b
+ dout(20) << __func__
+ << " initialize csum setting for new blob " << *wi.b
<< " csum_type " << Checksummer::get_csum_type_string(csum)
<< " csum_order " << csum_order
<< " csum_length 0x" << std::hex << csum_length << std::dec
}
dblob.allocated(p2align(b_off, min_alloc_size), final_length, extents);
- dout(20) << __func__ << " blob " << *b << dendl;
+ dout(20) << __func__ << " blob " << *wi.b << dendl;
if (dblob.has_csum()) {
dblob.calc_csum(b_off, *l);
}
<< l->length() << std::dec << " write via deferred" << dendl;
bluestore_deferred_op_t *op = _get_deferred_op(txc);
op->op = bluestore_deferred_op_t::OP_WRITE;
- int r = b->get_blob().map(
+ int r = wi.b->get_blob().map(
b_off, l->length(),
[&](uint64_t offset, uint64_t length) {
op->extents.emplace_back(bluestore_pextent_t(offset, length));
op->data = *l;
logger->inc(l_bluestore_write_deferred);
} else {
- b->get_blob().map_bl(
+ wi.b->get_blob().map_bl(
b_off, *l,
[&](uint64_t offset, bufferlist& t) {
bdev->aio_write(offset, t, &txc->ioc, false);