From e2a508573f784e2f5de38257df8367e85646ab75 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 11 Feb 2015 10:30:51 -0800 Subject: [PATCH] ReplicatedPG::on_change: requeue in_progress_async_reads close to last Fixes: 10768 Signed-off-by: Samuel Just --- src/osd/ReplicatedPG.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 93f4f72b88d18..488ebd8eac0fe 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -10402,14 +10402,6 @@ void ReplicatedPG::on_change(ObjectStore::Transaction *t) context_registry_on_change(); - for (list >::iterator i = - in_progress_async_reads.begin(); - i != in_progress_async_reads.end(); - in_progress_async_reads.erase(i++)) { - close_op_ctx(i->second, -ECANCELED); - requeue_op(i->first); - } - cancel_copy_ops(is_primary()); cancel_flush_ops(is_primary()); cancel_proxy_read_ops(is_primary()); @@ -10446,6 +10438,16 @@ void ReplicatedPG::on_change(ObjectStore::Transaction *t) waiting_for_all_missing.clear(); } + + for (list >::iterator i = + in_progress_async_reads.begin(); + i != in_progress_async_reads.end(); + in_progress_async_reads.erase(i++)) { + close_op_ctx(i->second, -ECANCELED); + if (is_primary()) + requeue_op(i->first); + } + // this will requeue ops we were working on but didn't finish, and // any dups apply_and_flush_repops(is_primary()); -- 2.39.5