From: xie xingguo Date: Tue, 8 Mar 2016 01:18:56 +0000 (+0800) Subject: osd: drop unnecessary transaction cleanup X-Git-Tag: v10.1.1~97^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=88aa26dc203c3e9396d84a4fd89fc9b64bb38929;p=ceph.git osd: drop unnecessary transaction cleanup 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 --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 15dc0af1d913..ffe79efa6858 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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(); }