From: Josh Durgin Date: Mon, 2 Dec 2013 22:54:04 +0000 (-0800) Subject: osd: read into correct variable for magic string X-Git-Tag: v0.74~41^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F887%2Fhead;p=ceph.git osd: read into correct variable for magic string 4d140a71a1a48081b449b7d8dde808eb6e74c6b2 refactored this and introduced a bug. peek_meta() was accidentally reading into magic, then replacing magic with val, which was always the empty string, resulting in the osd always failing to start due to 'mismatched' magic values. Signed-off-by: Josh Durgin --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 059b677db60..9089c30fb40 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -731,7 +731,7 @@ int OSD::peek_meta(ObjectStore *store, std::string& magic, { string val; - int r = store->read_meta("magic", &magic); + int r = store->read_meta("magic", &val); if (r < 0) return r; magic = val;