diff options
author | Sage Weil <sage@inktank.com> | 2013-05-29 22:44:40 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-29 22:44:40 -0700 |
commit | bd2ba0e3b26bd275befcd6358ce37f5e41deb847 (patch) | |
tree | 04c068cf8b0bd76432c7616bcd1b329d18f155b2 | |
parent | e21f8df1eb0c459d12911785c69f7427d1ad5689 (diff) | |
parent | 50ac8917f175d1b107c18ecb025af1a7b103d634 (diff) | |
download | ceph-bd2ba0e3b26bd275befcd6358ce37f5e41deb847.tar.gz |
Merge branch 'next'
-rw-r--r-- | src/mon/OSDMonitor.cc | 5 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.cc | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 39e3fe9bbe0..338b5195af2 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -926,7 +926,8 @@ bool OSDMonitor::check_failure(utime_t now, int target_osd, failure_info_t& fi) << dendl; // already pending failure? - if (pending_inc.new_state[target_osd] & CEPH_OSD_UP) { + if (pending_inc.new_state.count(target_osd) && + pending_inc.new_state[target_osd] & CEPH_OSD_UP) { dout(10) << " already pending failure" << dendl; return true; } @@ -3174,6 +3175,8 @@ bool OSDMonitor::prepare_command(MMonCommand *m) done: dout(10) << " creating osd." << i << dendl; + if (pending_inc.new_state.count(i) == 0) + pending_inc.new_state[i] = 0; pending_inc.new_state[i] |= CEPH_OSD_EXISTS | CEPH_OSD_NEW; if (!uuid.is_zero()) pending_inc.new_uuid[i] = uuid; diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 019d6b8d99b..de60a6a9205 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -4383,6 +4383,11 @@ int ReplicatedPG::find_object_context(const hobject_t& oid, if (oid.snap == CEPH_SNAPDIR) { // return head or snapdir, whichever exists. ObjectContext *obc = get_object_context(head, oloc, can_create); + if (obc && !obc->obs.exists) { + // ignore it if the obc exists but the object doesn't + put_object_context(obc); + obc = NULL; + } if (!obc) { obc = get_object_context(snapdir, oloc, can_create); } |