mirror of
https://github.com/ceph/ceph
synced 2025-01-04 10:12:30 +00:00
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 <optimistyzy@gmail.com>
This commit is contained in:
parent
fbad77c727
commit
5ffee830f6
@ -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<std::mutex> 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<std::mutex> l(t->ctx->lock);
|
||||
t->ctx->cond.notify_all();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user