X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fspdk%2Flib%2Fblob%2Frequest.c;h=134d5c969dc5263ca65d2769103c2b27bbffd2b7;hb=9f95a23ce0ce15b5cd2b85dc8aaf3906fbf7f463;hp=b66fa76598019e8fb3716a582e55815c49fbc118;hpb=048b4641096fe966f6d4b1d982fa5ebd37d72d84;p=ceph.git diff --git a/ceph/src/spdk/lib/blob/request.c b/ceph/src/spdk/lib/blob/request.c index b66fa7659..134d5c969 100644 --- a/ceph/src/spdk/lib/blob/request.c +++ b/ceph/src/spdk/lib/blob/request.c @@ -51,7 +51,7 @@ spdk_bs_call_cpl(struct spdk_bs_cpl *cpl, int bserrno) break; case SPDK_BS_CPL_TYPE_BS_HANDLE: cpl->u.bs_handle.cb_fn(cpl->u.bs_handle.cb_arg, - cpl->u.bs_handle.bs, + bserrno == 0 ? cpl->u.bs_handle.bs : NULL, bserrno); break; case SPDK_BS_CPL_TYPE_BLOB_BASIC: @@ -60,12 +60,12 @@ spdk_bs_call_cpl(struct spdk_bs_cpl *cpl, int bserrno) break; case SPDK_BS_CPL_TYPE_BLOBID: cpl->u.blobid.cb_fn(cpl->u.blobid.cb_arg, - cpl->u.blobid.blobid, + bserrno == 0 ? cpl->u.blobid.blobid : SPDK_BLOBID_INVALID, bserrno); break; case SPDK_BS_CPL_TYPE_BLOB_HANDLE: cpl->u.blob_handle.cb_fn(cpl->u.blob_handle.cb_arg, - cpl->u.blob_handle.blob, + bserrno == 0 ? cpl->u.blob_handle.blob : NULL, bserrno); break; case SPDK_BS_CPL_TYPE_NESTED_SEQUENCE: @@ -107,7 +107,7 @@ spdk_bs_sequence_start(struct spdk_io_channel *_channel, struct spdk_bs_request_set *set; channel = spdk_io_channel_get_ctx(_channel); - + assert(channel != NULL); set = TAILQ_FIRST(&channel->reqs); if (!set) { return NULL; @@ -311,7 +311,7 @@ spdk_bs_batch_open(struct spdk_io_channel *_channel, struct spdk_bs_request_set *set; channel = spdk_io_channel_get_ctx(_channel); - + assert(channel != NULL); set = TAILQ_FIRST(&channel->reqs); if (!set) { return NULL; @@ -466,7 +466,7 @@ spdk_bs_user_op_alloc(struct spdk_io_channel *_channel, struct spdk_bs_cpl *cpl, struct spdk_bs_user_op_args *args; channel = spdk_io_channel_get_ctx(_channel); - + assert(channel != NULL); set = TAILQ_FIRST(&channel->reqs); if (!set) { return NULL;