]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-filestore-dump: Improve error message
authorDavid Zafman <david.zafman@inktank.com>
Fri, 8 Feb 2013 07:39:11 +0000 (23:39 -0800)
committerDavid Zafman <david.zafman@inktank.com>
Tue, 12 Feb 2013 06:21:45 +0000 (22:21 -0800)
Fix error message when encountering already in use
OSD store.

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
src/tools/ceph-filestore-dump.cc

index 2dfa1e539ff22a45f899080c6ad673bdcbd4163f..d7f5f1773ee8b774812738ea7ede47884d14f1de 100644 (file)
@@ -167,14 +167,19 @@ int main(int argc, char **argv)
 
   ObjectStore *fs = new FileStore(fspath, jpath);
   
-  if (fs->mount() < 0) {
-    cout << "mount failed" << std::endl;
+  int r = fs->mount();
+  if (r < 0) {
+    if (r == -EBUSY) {
+      cout << "OSD has the store locked" << std::endl;
+    } else {
+      cout << "Mount failed with '" << cpp_strerror(-r) << "'" << std::endl;
+    }
     return 1;
   }
 
   bool found = false;
   vector<coll_t> ls;
-  int r = fs->list_collections(ls);
+  r = fs->list_collections(ls);
   if (r < 0) {
     cerr << "failed to list pgs: " << cpp_strerror(-r) << std::endl;
     exit(1);