From: Igor Fedotov Date: Mon, 2 Jul 2018 17:10:49 +0000 (+0300) Subject: os/bluestore_tool: handle fsck's returned status properly. X-Git-Tag: v14.0.1~598^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c39a2d19ce0946f3c71c181cffa2cdfaededc7d5;p=ceph.git os/bluestore_tool: handle fsck's returned status properly. Signed-off-by: Igor Fedotov --- diff --git a/src/os/bluestore/bluestore_tool.cc b/src/os/bluestore/bluestore_tool.cc index ccdc0e403fef2..b3209fbaf0d96 100644 --- a/src/os/bluestore/bluestore_tool.cc +++ b/src/os/bluestore/bluestore_tool.cc @@ -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;