bdev/compress: return error to reducelib if comp/decomp fails

Change-Id: Ibdea83543069e80d73358e95fa43f7b27c351d1a
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451064
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
paul luse 2019-04-12 13:39:43 -04:00 committed by Jim Harris
parent bbc49ab42f
commit a50100900d

View File

@ -521,7 +521,13 @@ _comp_reduce_compress(struct spdk_reduce_backing_dev *dev,
struct iovec *dst_iovs, int dst_iovcnt,
struct spdk_reduce_vol_cb_args *cb_arg)
{
_compress_operation(dev, src_iovs, src_iovcnt, dst_iovs, dst_iovcnt, true, cb_arg);
int rc;
rc = _compress_operation(dev, src_iovs, src_iovcnt, dst_iovs, dst_iovcnt, true, cb_arg);
if (rc) {
SPDK_ERRLOG("with compress operation code %d (%s)\n", rc, spdk_strerror(-rc));
cb_arg->cb_fn(cb_arg->cb_arg, rc);
}
}
/* Entry point for reduce lib to issue a decompress operation. */
@ -531,7 +537,13 @@ _comp_reduce_decompress(struct spdk_reduce_backing_dev *dev,
struct iovec *dst_iovs, int dst_iovcnt,
struct spdk_reduce_vol_cb_args *cb_arg)
{
_compress_operation(dev, src_iovs, src_iovcnt, dst_iovs, dst_iovcnt, false, cb_arg);
int rc;
rc = _compress_operation(dev, src_iovs, src_iovcnt, dst_iovs, dst_iovcnt, false, cb_arg);
if (rc) {
SPDK_ERRLOG("with decompress operation code %d (%s)\n", rc, spdk_strerror(-rc));
cb_arg->cb_fn(cb_arg->cb_arg, rc);
}
}
/* Callback for getting a buf from the bdev pool in the event that the caller passed