From: Zhiqiang Wang Date: Thu, 12 Mar 2015 07:10:54 +0000 (+0800) Subject: osd/ReplicatedPG: correctly handle the evict op when obs doesn't exist X-Git-Tag: v9.0.1~38^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1fa343f2360c6ef725bf6ec63337b379f4f28bfb;p=ceph.git osd/ReplicatedPG: correctly handle the evict op when obs doesn't exist 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 --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index ac977a136e4a..ee75fa011c5e 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -3750,6 +3750,10 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector& ops) result = -EINVAL; break; } + if (!obs.exists) { + result = 0; + break; + } if (oi.is_dirty()) { result = -EBUSY; break;