]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: drop unnecessary transaction cleanup
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 8 Mar 2016 01:18:56 +0000 (09:18 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 23 Mar 2016 00:43:24 +0000 (08:43 +0800)
The lock() method will ensure 'dirty_info' will be false,
and within this function's scope I see no possibility to
set 'dirty_info' true. Thus I guess the transaction cleanup
logic before exit is never reachable and therefore shall be
considered as redundant and can be safely removed.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PG.cc

index 15dc0af1d913ce3cfea4021f74eb918f6a530490..ffe79efa685822b8dfee92490be36b6d915c8550 100644 (file)
@@ -2003,12 +2003,7 @@ void PG::_activate_committed(epoch_t epoch, epoch_t activation_epoch)
     }
   }
 
-  if (dirty_info) {
-    ObjectStore::Transaction t;
-    write_if_dirty(t);
-    int tr = osd->store->queue_transaction(osr.get(), std::move(t), NULL);
-    assert(tr == 0);
-  }
+  assert(!dirty_info);
 
   unlock();
 }