bufferlist *l = &wi.bl;
uint64_t final_length = b->length;
uint64_t csum_length = b->length;
+ size_t csum_order = wctx->csum_order;
bufferlist compressed_bl;
CompressorRef c;
if (b_off == 0 &&
// checksum
if (csum_type) {
- b->init_csum(csum_type, 12, csum_length); // FIXME adjust b size
+ b->init_csum(csum_type, csum_order, csum_length);
b->calc_csum(b_off, *l);
}
dout(20) << __func__ << " will do buffered write" << dendl;
wctx.buffered = true;
}
+ wctx.csum_order = block_size_order;
// compression parameters
unsigned alloc_hints = o->onode.alloc_hint_flags;
bool buffered = false; ///< buffered write
bool compress = false; ///< compressed write
uint64_t comp_blob_size = 0; ///< target compressed blob size
+ unsigned csum_order = 0; ///< target checksum chunk order
vector<bluestore_lextent_t> lex_old; ///< must deref blobs