From f11b380e9aacb9b165adc642a618cb3ab1f166fa Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Mon, 2 Dec 2013 14:54:04 -0800 Subject: [PATCH] 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 --- src/osd/OSD.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;