]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: drop result check of OP_TRY_RENAME 11077/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 14 Sep 2016 07:19:01 +0000 (15:19 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 14 Sep 2016 07:19:01 +0000 (15:19 +0800)
Because _rename() never returns -ENOENT, it only
returns -EEXIST on failure.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index c022e2ee05db8f2cbe7ace9669b3793cdec1358c..fd5f2c084e53ad8b390c7f1085736e457406c6bc 100644 (file)
@@ -6668,7 +6668,7 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t)
 
     case Transaction::OP_COLL_MOVE_RENAME:
     case Transaction::OP_TRY_RENAME:
-    {
+      {
        assert(op->cid == op->dest_cid);
        const ghobject_t& noid = i.get_oid(op->dest_oid);
        OnodeRef& no = ovec[op->dest_oid];
@@ -6676,8 +6676,6 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t)
          no = c->get_onode(noid, false);
        }
        r = _rename(txc, c, o, no, noid);
-       if (r == -ENOENT && op->op == Transaction::OP_TRY_RENAME)
-         r = 0;
       }
       break;