Spdk/module/bdev/raid
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
..
bdev_raid_rpc.c raid1: module implementation 2023-01-09 12:39:19 +00:00
bdev_raid.c bdev/raid: Handle resize event from a base_bdev 2023-01-16 08:24:16 +00:00
bdev_raid.h bdev/raid: Handle resize event from a base_bdev 2023-01-16 08:24:16 +00:00
concat.c concat: io metadata support 2023-01-11 09:08:52 +00:00
Makefile raid1: module implementation 2023-01-09 12:39:19 +00:00
raid0.c bdev/raid0: Support resize when increasing the size of base bdevs 2023-01-17 19:45:34 +00:00
raid1.c raid1: io metadata support 2023-01-11 09:08:52 +00:00
raid5f.c raid5f: io metadata support 2023-01-11 09:08:52 +00:00