From: Samuel Just Date: Wed, 18 Jan 2017 18:24:13 +0000 (-0800) Subject: PrimaryLogPG::try_lock_for_read: give up if missing X-Git-Tag: v11.2.1~111^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d186951730d947881fea0e638a6e112718820ae0;p=ceph.git PrimaryLogPG::try_lock_for_read: give up if missing The only users calc_*_subsets might try to read_lock an object which is missing on the primary. Returning false in those cases is perfectly reasonable and avoids the problem. Fixes: http://tracker.ceph.com/issues/18583 Signed-off-by: Samuel Just (cherry picked from commit 3833440adea6f8bcb0093603c3a9d16360ed57ec) --- diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h index 114a21c662551..d698f7175755c 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -345,6 +345,8 @@ public: bool try_lock_for_read( const hobject_t &hoid, ObcLockManager &manager) override { + if (is_missing_object(hoid)) + return false; auto obc = get_object_context(hoid, false, nullptr); if (!obc) return false;