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:
parent
3090f4012e
commit
a6e3c8e90b
@ -1818,11 +1818,6 @@ spdk_bdev_write_zeroes_blocks(struct spdk_bdev_desc *desc, struct spdk_io_channe
|
||||
uint64_t len;
|
||||
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)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user