diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index 25766b5002d..4318b1ce462 100644 --- a/src/test/librbd/fsx.cc +++ b/src/test/librbd/fsx.cc @@ -1230,6 +1230,7 @@ nbd_open(const char *name, struct rbd_ctx *ctx) SubProcess process("rbd-nbd", SubProcess::KEEP, SubProcess::PIPE, SubProcess::KEEP); process.add_cmd_arg("map"); + process.add_cmd_arg("--timeout=600"); std::string img; img.append(pool); img.append("/"); diff --git a/src/tools/rbd_nbd/rbd-nbd.cc b/src/tools/rbd_nbd/rbd-nbd.cc index 1c56d73cb12..77d8e82e299 100644 --- a/src/tools/rbd_nbd/rbd-nbd.cc +++ b/src/tools/rbd_nbd/rbd-nbd.cc @@ -227,7 +227,7 @@ private: { ceph_assert(!reader_thread.is_started()); std::unique_lock l{lock}; - cond.wait(l, [this] { return io_finished.empty(); }); + cond.wait(l, [this] { return io_pending.empty(); }); while(!io_finished.empty()) { std::unique_ptr free_ctx(io_finished.front());