Merge pull request #29858 from dillaman/wip-41409

test/librbd: set nbd timeout due to newer kernels defaulting it on

Reviewed-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
Mykola Golub 2019-08-28 08:19:25 +03:00 committed by GitHub
commit a7d88133d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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("/");

View File

@ -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<IOContext> free_ctx(io_finished.front());