diff options
author | Greg Farnum <greg@inktank.com> | 2012-11-28 14:27:10 -0800 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2012-11-28 16:28:51 -0800 |
commit | 3fe7c6cbe0f19aab787ea5612c636165dfad6db8 (patch) | |
tree | cbe01d885c525ef62e7a72a45a771422c630ca63 /src/ceph_mon.cc | |
parent | 60f60ff738b0c34af7c394a401987b2604a84468 (diff) | |
download | ceph-3fe7c6cbe0f19aab787ea5612c636165dfad6db8.tar.gz |
mon: add new get_bl_[sn|ss]_safe functions
These functions are like the non-safe versions, but assert that
there were no disk errors and have void return types. Change a
bunch of callers who weren't checking the return code to use
these variants instead.
(Unfortunately we can't make them default safe because several of
the callers depend on getting back the length, and are perfectly happy
with ENOENT producing a 0 return value.)
Signed-off-by: Greg Farnum <greg@inktank.com>
Diffstat (limited to 'src/ceph_mon.cc')
-rw-r--r-- | src/ceph_mon.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc index da4529f2765..eee048027aa 100644 --- a/src/ceph_mon.cc +++ b/src/ceph_mon.cc @@ -284,14 +284,14 @@ int main(int argc, const char **argv) { bufferlist mapbl; bufferlist latest; - store.get_bl_ss(latest, "monmap", "latest"); + store.get_bl_ss_safe(latest, "monmap", "latest"); if (latest.length() > 0) { bufferlist::iterator p = latest.begin(); version_t v; ::decode(v, p); ::decode(mapbl, p); } else { - store.get_bl_ss(mapbl, "mkfs", "monmap"); + store.get_bl_ss_safe(mapbl, "mkfs", "monmap"); if (mapbl.length() == 0) { cerr << "mon fs missing 'monmap/latest' and 'mkfs/monmap'" << std::endl; exit(1); |