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: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456924 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: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
fdb03395db
commit
a8c32ed5fe
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user