]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore_tool: handle fsck's returned status properly.
authorIgor Fedotov <ifedotov@suse.com>
Mon, 2 Jul 2018 17:10:49 +0000 (20:10 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 9 Aug 2018 21:52:21 +0000 (00:52 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/os/bluestore/bluestore_tool.cc

index ccdc0e403fef2d201a3c1c6b5f18bccc57809ec1..b3209fbaf0d9644980ed9740c42f54f46bc6a1e4 100644 (file)
@@ -329,8 +329,12 @@ int main(int argc, char **argv)
     if (r < 0) {
       cerr << "error from fsck: " << cpp_strerror(r) << std::endl;
       exit(EXIT_FAILURE);
+    } else if (r > 0) {
+      cerr << action << " found " << r << " error(s)" << std::endl;
+      exit(EXIT_FAILURE);
+    } else {
+      cout << action << " success" << std::endl;
     }
-    cout << action << " success" << std::endl;
   }
   else if (action == "prime-osd-dir") {
     bluestore_bdev_label_t label;