]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: read into correct variable for magic string 887/head
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 2 Dec 2013 22:54:04 +0000 (14:54 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 2 Dec 2013 23:16:46 +0000 (15:16 -0800)
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 <josh.durgin@inktank.com>
src/osd/OSD.cc

index 059b677db60201d0863356194de8437789f1e74e..9089c30fb40682c19d3d95b5f62786fe1790e456 100644 (file)
@@ -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;