summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-05-28 14:08:09 +0200
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-05-31 19:15:22 +0200
commit679775ae2d5bda73e4b973cf2dcebce6df33dca4 (patch)
tree80a6827e718b4e903f4cabe5448c994742812161
parent2a024091831ba194b68d716f0a9104972aa520d5 (diff)
downloadceph-679775ae2d5bda73e4b973cf2dcebce6df33dca4.tar.gz
small_io_bench_fs.cc: check return value of FileStore::mkfs/mount()
CID 743398 (#1 of 1): Unchecked return value (CHECKED_RETURN) check_return: Calling function "FileStore::mount()" without checking return value (as is done elsewhere 4 out of 5 times). unchecked_value: No check of the return value of "fs.FileStore::mount()" Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r--src/test/bench/small_io_bench_fs.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/bench/small_io_bench_fs.cc b/src/test/bench/small_io_bench_fs.cc
index 4a3adc9e5dd..61fbacc5570 100644
--- a/src/test/bench/small_io_bench_fs.cc
+++ b/src/test/bench/small_io_bench_fs.cc
@@ -125,8 +125,16 @@ int main(int argc, char **argv)
FileStore fs(vm["filestore-path"].as<string>(),
vm["journal-path"].as<string>());
- fs.mkfs();
- fs.mount();
+
+ if (fs.mkfs() < 0) {
+ cout << "mkfs failed" << std::endl;
+ return 1;
+ }
+
+ if (fs.mount() < 0) {
+ cout << "mount failed" << std::endl;
+ return 1;
+ }
ostream *detailed_ops = 0;
ofstream myfile;