]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedBackend: clean up code. 20127/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Fri, 26 Jan 2018 15:58:18 +0000 (23:58 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Fri, 26 Jan 2018 15:58:18 +0000 (23:58 +0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/osd/ReplicatedBackend.cc

index de0175f6c0e897a64641d2b68cd544999fa8ad86..10a7aadaf692fb13f3490c023aef661d28895064 100644 (file)
@@ -1021,17 +1021,17 @@ void ReplicatedBackend::issue_op(
   InProgressOp *op,
   ObjectStore::Transaction &op_t)
 {
-  if (op->op)
+  if (op->op) {
     op->op->pg_trace.event("issue replication ops");
-
-  if (parent->get_actingbackfill_shards().size() > 1) {
-    ostringstream ss;
-    set<pg_shard_t> replicas = parent->get_actingbackfill_shards();
-    replicas.erase(parent->whoami_shard());
-    ss << "waiting for subops from " << replicas;
-    if (op->op)
+    if (parent->get_actingbackfill_shards().size() > 1) {
+      ostringstream ss;
+      set<pg_shard_t> replicas = parent->get_actingbackfill_shards();
+      replicas.erase(parent->whoami_shard());
+      ss << "waiting for subops from " << replicas;
       op->op->mark_sub_op_sent(ss.str());
+    }
   }
+
   for (set<pg_shard_t>::const_iterator i =
         parent->get_actingbackfill_shards().begin();
        i != parent->get_actingbackfill_shards().end();