Spdk/test/bdev
Shuhei Matsumoto c22b052b60 bdev/raid0: Support resize when increasing the size of base bdevs
Implement the resize function for RAID0. raid0_resize() calculate the
new raid_bdev's block count and if it is different from the old block
count, call spdk_bdev_notify_blockcnt_change() with the new block count.

A raid0 bdev always opens all base bdevs. Hence, if the size of base
bdevs are reduced, resize fails now. This limitation will be removed
later.

Add a simple functional test for this feature. The test is to create
a raid0 bdev with two null bdevs, resize one null bdev, check if the
raid0 bdev is not resize, resize another null bdev, check if the raid0
bdev is resized.

test/iscsi_tgt/resize/resize.sh was used a reference to write the test.
Using jq rather than grep&sed is better and hence replace grep&sed by jq
of test/iscsi_tgt/resize/resize.sh together in this patch.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I07136648c4189b970843fc6da51ff40355423144
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16261
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-17 19:45:34 +00:00
..
bdevio test: a bit more thorough io check in bdevio 2022-11-28 20:09:48 +00:00
bdevperf Add SPDX header to various files 2022-11-29 08:27:51 +00:00
bdev_raid.sh bdev/raid0: Support resize when increasing the size of base bdevs 2023-01-17 19:45:34 +00:00
blockdev.sh misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
Makefile bdevperf: promote bdevperf from test to example application 2022-11-16 09:52:41 +00:00
nbd_common.sh add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
nonarray.json json: fix parsing json problems when json config is invalid. 2022-09-02 07:32:21 +00:00
nonenclosed.json json: fix parsing json problems when json config is invalid. 2022-09-02 07:32:21 +00:00