Spdk/module/bdev/raid
Amir Haroush ef65d8467c bdev/raid: fix flush on raid0
the calculation (offset_blocks + num_blocks - 1) didn't check if num_blocks is 0
which it is in case of flush.
in flush case, offset_blocks was also 0, so we got (-1) and we got big unsigned number.
just replace it with (offset_blocks + num_blocks - (num_blocks > 0)) to solve the issue.
NOTE this is only fixing the wrong math, there might be more issues that outside the scope of this commit
for example, if flush(x, y) called, no bdev implementation really use those values, and all bdevs just flush the whole disk
also, a convention is that fluch(0, 0) should flush it all (but like I said before, all bdevs flush the whole disk anyway)

Change-Id: I7e991653bc3050349dc155365b2c37ecc2d6b24c
Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13579
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-14 07:44:19 +00:00
..
bdev_raid_rpc.c Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
bdev_raid.c module/raid: raid5: rename to raid5f 2022-07-27 08:51:21 +00:00
bdev_raid.h module/raid: raid5: rename to raid5f 2022-07-27 08:51:21 +00:00
concat.c raid/concat: update bdev readv/writev to ext API. 2022-07-14 09:46:56 +00:00
Makefile module/raid: raid5: rename to raid5f 2022-07-27 08:51:21 +00:00
raid0.c bdev/raid: fix flush on raid0 2022-09-14 07:44:19 +00:00
raid5f.c module/raid: raid5: rename to raid5f 2022-07-27 08:51:21 +00:00