forked from vitalif/vitastor
Fix part bitmap addresses
parent
2db2ed22ea
commit
18f71b059a
|
@ -887,8 +887,12 @@ void cluster_client_t::handle_op_part(cluster_op_part_t *part)
|
|||
if (op->opcode == OSD_OP_READ)
|
||||
{
|
||||
// Copy (OR) bitmap
|
||||
auto & pool_cfg = st_cli.pool_config[INODE_POOL(op->cur_inode)];
|
||||
uint32_t pg_block_size = bs_block_size * (
|
||||
pool_cfg.scheme == POOL_SCHEME_REPLICATED ? 1 : pool_cfg.pg_size-pool_cfg.parity_chunks
|
||||
);
|
||||
uint32_t object_offset = (part->op.req.rw.offset - op->offset) / bs_bitmap_granularity;
|
||||
uint32_t part_offset = part->op.req.rw.offset / bs_bitmap_granularity;
|
||||
uint32_t part_offset = (part->op.req.rw.offset % pg_block_size) / bs_bitmap_granularity;
|
||||
uint32_t part_len = part->op.req.rw.len / bs_bitmap_granularity;
|
||||
if (!(object_offset & 0x7) && !(part_offset & 0x7) && (part_len >= 8))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue