]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: correctly handle the evict op when obs doesn't exist
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 12 Mar 2015 07:10:54 +0000 (15:10 +0800)
committerZhiqiang Wang <zhiqiang.wang@intel.com>
Fri, 17 Apr 2015 01:12:13 +0000 (09:12 +0800)
When obs doesn't exist in the cache tier, which means the object is not
in the cache tier, we can return success for the evict op.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/osd/ReplicatedPG.cc

index ac977a136e4a37072bef62f05d935ff92ca5f40c..ee75fa011c5eedc4381b0d117fb98ea6d14da409 100644 (file)
@@ -3750,6 +3750,10 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
          result = -EINVAL;
          break;
        }
+       if (!obs.exists) {
+         result = 0;
+         break;
+       }
        if (oi.is_dirty()) {
          result = -EBUSY;
          break;