From: optimistyzy Date: Tue, 10 Jan 2017 13:01:59 +0000 (+0800) Subject: NVMEdevice: fix the unrelease segs issue X-Git-Tag: v12.0.0~234^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12862%2Fhead;p=ceph.git NVMEdevice: fix the unrelease segs issue When the read or flush command fails, we need to release segs. Or we can abort it like what we do for write. Signed-off-by: optimistyzy --- diff --git a/src/os/bluestore/NVMEDevice.cc b/src/os/bluestore/NVMEDevice.cc index 2413d63f3609..380526470503 100644 --- a/src/os/bluestore/NVMEDevice.cc +++ b/src/os/bluestore/NVMEDevice.cc @@ -444,6 +444,7 @@ void SharedDriverData::_aio_thread() derr << __func__ << " failed to read" << dendl; --t->ctx->num_reading; t->return_code = r; + t->release_segs(); std::unique_lock l(t->ctx->lock); t->ctx->cond.notify_all(); } else { @@ -460,6 +461,7 @@ void SharedDriverData::_aio_thread() if (r < 0) { derr << __func__ << " failed to flush" << dendl; t->return_code = r; + t->release_segs(); std::unique_lock l(t->ctx->lock); t->ctx->cond.notify_all(); } else {