Fix non-working OSD_OP_READ_CHAIN_BITMAP O_o
This commit is contained in:
@@ -1077,7 +1077,7 @@ bool cluster_client_t::try_send(cluster_op_t *op, int i)
|
|||||||
pool_cfg.scheme == POOL_SCHEME_REPLICATED ? 1 : pool_cfg.pg_size-pool_cfg.parity_chunks
|
pool_cfg.scheme == POOL_SCHEME_REPLICATED ? 1 : pool_cfg.pg_size-pool_cfg.parity_chunks
|
||||||
);
|
);
|
||||||
uint64_t meta_rev = 0;
|
uint64_t meta_rev = 0;
|
||||||
if (op->opcode != OSD_OP_READ_BITMAP && op->opcode != OSD_OP_READ_CHAIN_BITMAP && op->opcode != OSD_OP_DELETE)
|
if (op->opcode != OSD_OP_READ_BITMAP && op->opcode != OSD_OP_DELETE)
|
||||||
{
|
{
|
||||||
auto ino_it = st_cli.inode_config.find(op->inode);
|
auto ino_it = st_cli.inode_config.find(op->inode);
|
||||||
if (ino_it != st_cli.inode_config.end())
|
if (ino_it != st_cli.inode_config.end())
|
||||||
|
|||||||
@@ -336,8 +336,8 @@ std::vector<osd_chain_read_t> osd_t::collect_chained_read_requests(osd_op_t *cur
|
|||||||
for (int chain_pos = 0; chain_pos < op_data->chain_size; chain_pos++)
|
for (int chain_pos = 0; chain_pos < op_data->chain_size; chain_pos++)
|
||||||
{
|
{
|
||||||
uint8_t *part_bitmap = ((uint8_t*)op_data->snapshot_bitmaps) + chain_pos*stripe_count*clean_entry_bitmap_size;
|
uint8_t *part_bitmap = ((uint8_t*)op_data->snapshot_bitmaps) + chain_pos*stripe_count*clean_entry_bitmap_size;
|
||||||
int start = (cur_op->req.rw.offset - op_data->oid.stripe)/bs_bitmap_granularity;
|
int start = !cur_op->req.rw.len ? 0 : (cur_op->req.rw.offset - op_data->oid.stripe)/bs_bitmap_granularity;
|
||||||
int end = start + cur_op->req.rw.len/bs_bitmap_granularity;
|
int end = !cur_op->req.rw.len ? op_data->pg_data_size*clean_entry_bitmap_size : start + cur_op->req.rw.len/bs_bitmap_granularity;
|
||||||
// Skip unneeded part in the beginning
|
// Skip unneeded part in the beginning
|
||||||
while (start < end && (
|
while (start < end && (
|
||||||
((global_bitmap[start>>3] >> (start&7)) & 1) ||
|
((global_bitmap[start>>3] >> (start&7)) & 1) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user