bdev: remove ERANGE check from spdk_bdev_write_zeroes_blocks()

spdk_bdev_io_valid_blocks() already takes care of this.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia7e5ede8d65d0b336ea676d5e25d07a3389573a5

Reviewed-on: https://review.gerrithub.io/414895
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Jim Harris 2018-06-12 09:01:00 -07:00
parent 3090f4012e
commit a6e3c8e90b

View File

@ -1818,11 +1818,6 @@ spdk_bdev_write_zeroes_blocks(struct spdk_bdev_desc *desc, struct spdk_io_channe
uint64_t len; uint64_t len;
bool split_request = false; bool split_request = false;
if (num_blocks > UINT64_MAX / spdk_bdev_get_block_size(bdev)) {
SPDK_ERRLOG("length argument out of range in write_zeroes\n");
return -ERANGE;
}
if (!spdk_bdev_io_valid_blocks(bdev, offset_blocks, num_blocks)) { if (!spdk_bdev_io_valid_blocks(bdev, offset_blocks, num_blocks)) {
return -EINVAL; return -EINVAL;
} }