Fix missing error handling in chained read sec_read_bmp handling
This commit is contained in:
@@ -82,6 +82,7 @@ int osd_t::read_bitmaps(osd_op_t *cur_op, pg_t *pg, int base_state)
|
|||||||
goto resume_0;
|
goto resume_0;
|
||||||
else if (op_data->st == base_state+1)
|
else if (op_data->st == base_state+1)
|
||||||
goto resume_1;
|
goto resume_1;
|
||||||
|
assert(op_data->st < base_state);
|
||||||
if (!pg || pg->state == PG_ACTIVE && pg->scheme == POOL_SCHEME_REPLICATED)
|
if (!pg || pg->state == PG_ACTIVE && pg->scheme == POOL_SCHEME_REPLICATED)
|
||||||
{
|
{
|
||||||
// Happy path for clean replicated PGs (all bitmaps are available locally)
|
// Happy path for clean replicated PGs (all bitmaps are available locally)
|
||||||
@@ -112,6 +113,12 @@ resume_0:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
resume_1:
|
resume_1:
|
||||||
|
if (op_data->errors > 0)
|
||||||
|
{
|
||||||
|
// Failure
|
||||||
|
finish_op(cur_op, op_data->errcode);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
if (pg->scheme != POOL_SCHEME_REPLICATED)
|
if (pg->scheme != POOL_SCHEME_REPLICATED)
|
||||||
{
|
{
|
||||||
for (int chain_num = 0; chain_num < op_data->chain_size; chain_num++)
|
for (int chain_num = 0; chain_num < op_data->chain_size; chain_num++)
|
||||||
@@ -607,7 +614,7 @@ void osd_t::send_chained_read_results(pg_t *pg, osd_op_t *cur_op)
|
|||||||
{
|
{
|
||||||
if (cur > prev)
|
if (cur > prev)
|
||||||
{
|
{
|
||||||
// Send buffer in parts to avoid copying
|
// Send buffer in parts to avoid copying
|
||||||
if (!prev_set)
|
if (!prev_set)
|
||||||
{
|
{
|
||||||
while ((cur-prev) > zero_buffer_size/bs_bitmap_granularity)
|
while ((cur-prev) > zero_buffer_size/bs_bitmap_granularity)
|
||||||
|
|||||||
Reference in New Issue
Block a user