Skip to content

Commit

Permalink
os/bluestore: print error if spdk_nvme_ns_cmd_writev() fails
Browse files Browse the repository at this point in the history
when spdk_nvme_ns_cmd_writev() func return error, it hasn't direct error
code. So it can add some error info.

Fixes: https://tracker.ceph.com/issues/41208
Signed-off-by: NancySu05 <[email protected]>
  • Loading branch information
tchaikov committed Dec 2, 2019
1 parent c6dd422 commit c888113
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/os/bluestore/NVMEDevice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ void SharedDriverQueueData::_aio_handle(Task *t, IOContext *ioc)
ns, qpair, lba_off, lba_count, io_complete, t, 0,
data_buf_reset_sgl, data_buf_next_sge);
if (r < 0) {
derr << __func__ << " failed to do write command" << dendl;
derr << __func__ << " failed to do write command: " << cpp_strerror(r) << dendl;
t->ctx->nvme_task_first = t->ctx->nvme_task_last = nullptr;
t->release_segs(this);
delete t;
Expand All @@ -421,7 +421,7 @@ void SharedDriverQueueData::_aio_handle(Task *t, IOContext *ioc)
ns, qpair, lba_off, lba_count, io_complete, t, 0,
data_buf_reset_sgl, data_buf_next_sge);
if (r < 0) {
derr << __func__ << " failed to read" << dendl;
derr << __func__ << " failed to read: " << cpp_strerror(r) << dendl;
t->release_segs(this);
delete t;
ceph_abort();
Expand All @@ -437,7 +437,7 @@ void SharedDriverQueueData::_aio_handle(Task *t, IOContext *ioc)
dout(20) << __func__ << " flush command issueed " << dendl;
r = spdk_nvme_ns_cmd_flush(ns, qpair, io_complete, t);
if (r < 0) {
derr << __func__ << " failed to flush" << dendl;
derr << __func__ << " failed to flush: " << cpp_strerror(r) << dendl;
t->release_segs(this);
delete t;
ceph_abort();
Expand Down

0 comments on commit c888113

Please sign in to comment.