Commit a8c32ed5 authored by Changpeng Liu's avatar Changpeng Liu Committed by Ben Walker
Browse files

blob: return error for write_zeroes and unmap requests



Actually write/writev/write_zeroes/unmap are never be called, and we add
the error code here to keep it same style with snapshot bs_bdev.

Change-Id: I32ad051c1902bd7080b894e36f7c89f1c8d27434
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456924


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent fdb03395
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -73,8 +73,6 @@ zeroes_readv(struct spdk_bs_dev *dev, struct spdk_io_channel *channel,
	cb_args->cb_fn(cb_args->channel, cb_args->cb_arg, 0);
}



static void
zeroes_writev(struct spdk_bs_dev *dev, struct spdk_io_channel *channel,
	      struct iovec *iov, int iovcnt,
@@ -90,7 +88,8 @@ zeroes_write_zeroes(struct spdk_bs_dev *dev, struct spdk_io_channel *channel,
		    uint64_t lba, uint32_t lba_count,
		    struct spdk_bs_dev_cb_args *cb_args)
{
	cb_args->cb_fn(cb_args->channel, cb_args->cb_arg, 0);
	cb_args->cb_fn(cb_args->channel, cb_args->cb_arg, -EPERM);
	assert(false);
}

static void
@@ -98,7 +97,8 @@ zeroes_unmap(struct spdk_bs_dev *dev, struct spdk_io_channel *channel,
	     uint64_t lba, uint32_t lba_count,
	     struct spdk_bs_dev_cb_args *cb_args)
{
	cb_args->cb_fn(cb_args->channel, cb_args->cb_arg, 0);
	cb_args->cb_fn(cb_args->channel, cb_args->cb_arg, -EPERM);
	assert(false);
}

static struct spdk_bs_dev g_zeroes_bs_dev = {