]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PrimaryLogPG::try_lock_for_read: give up if missing 14616/head
authorSamuel Just <sjust@redhat.com>
Wed, 18 Jan 2017 18:24:13 +0000 (10:24 -0800)
committerNathan Cutler <ncutler@suse.com>
Mon, 3 Jul 2017 10:30:53 +0000 (12:30 +0200)
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 <sjust@redhat.com>
(cherry picked from commit 3833440adea6f8bcb0093603c3a9d16360ed57ec)

src/osd/PrimaryLogPG.h

index 114a21c66255157f40b5146742a756cc064bba70..d698f7175755ca291d7ec8bc9ed7f24acecbe6e2 100644 (file)
@@ -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;