Skip to content

Commit

Permalink
PrimaryLogPG::try_lock_for_read: give up if missing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
athanatos committed Jan 18, 2017
1 parent 68defc2 commit 3833440
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/osd/PrimaryLogPG.h
Expand Up @@ -345,6 +345,8 @@ class PrimaryLogPG : public PG, public PGBackend::Listener {
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;
Expand Down

0 comments on commit 3833440

Please sign in to comment.