]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: for osd_op_create, if ob existed don't do t->touch. 5975/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Fri, 18 Sep 2015 06:39:38 +0000 (14:39 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Fri, 18 Sep 2015 06:39:38 +0000 (14:39 +0800)
Although if ob existed, t->touch don't meet error. But this cause one
transaction include write journal.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/osd/ReplicatedPG.cc

index cfda5b00dfd8f83c26595b1ca6242189bcfdaff8..d1f348e84bc5ee80bf69fff9f08d71aa1c4cc313 100644 (file)
@@ -4766,8 +4766,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
           if (result >= 0) {
            if (maybe_create_new_object(ctx)) {
               ctx->mod_desc.create();
+             t->touch(soid);
            }
-            t->touch(soid);
           }
        }
       }