lib/nvme: fix cuse return status code
For admin as well as for IO operations the ioctl should return NVMe status code. Change-Id: Icf8efde674b847fb03e5532f47c00b1c2cdcf328 Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477492 Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
3cca1b3673
commit
66585bd4be
@ -105,9 +105,9 @@ cuse_nvme_admin_cmd_cb(void *arg, const struct spdk_nvme_cpl *cpl)
|
||||
if (ctx->data_len > 0) {
|
||||
out_iov[1].iov_base = ctx->data;
|
||||
out_iov[1].iov_len = ctx->data_len;
|
||||
fuse_reply_ioctl_iov(ctx->req, 0, out_iov, 2);
|
||||
fuse_reply_ioctl_iov(ctx->req, cpl->status.sc, out_iov, 2);
|
||||
} else {
|
||||
fuse_reply_ioctl_iov(ctx->req, 0, out_iov, 1);
|
||||
fuse_reply_ioctl_iov(ctx->req, cpl->status.sc, out_iov, 1);
|
||||
}
|
||||
|
||||
cuse_io_ctx_free(ctx);
|
||||
@ -260,7 +260,7 @@ cuse_nvme_submit_io_write_done(void *ref, const struct spdk_nvme_cpl *cpl)
|
||||
{
|
||||
struct cuse_io_ctx *ctx = (struct cuse_io_ctx *)ref;
|
||||
|
||||
fuse_reply_ioctl_iov(ctx->req, 0, NULL, 0);
|
||||
fuse_reply_ioctl_iov(ctx->req, cpl->status.sc, NULL, 0);
|
||||
|
||||
cuse_io_ctx_free(ctx);
|
||||
}
|
||||
@ -345,7 +345,7 @@ cuse_nvme_submit_io_read_done(void *ref, const struct spdk_nvme_cpl *cpl)
|
||||
iov.iov_base = ctx->data;
|
||||
iov.iov_len = ctx->data_len;
|
||||
|
||||
fuse_reply_ioctl_iov(ctx->req, 0, &iov, 1);
|
||||
fuse_reply_ioctl_iov(ctx->req, cpl->status.sc, &iov, 1);
|
||||
|
||||
cuse_io_ctx_free(ctx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user