History log of /spdk/module/bdev/raid/raid1.c (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v25.01-rc1, v24.09, v25.01-pre, v24.09-rc1, v24.05, v24.09-pre, v24.05-rc1
# 3b9baa5f 20-Mar-2024 Loïc Yavercovski <loic.yavercovski@gmail.com>

bdev/raid1: Support resize when increasing the size of base bdevs

Implement the resize function for RAID1. raid1_resize() calculate the
new raid_bdev's block count and if it is different from the ol

bdev/raid1: Support resize when increasing the size of base bdevs

Implement the resize function for RAID1. raid1_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.

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

The commit is an overall copy/adaptation of the work of Shuhei Matsumoto
with raid0.

Change-Id: I0737ba3fe4e1260d35d51e7b022c9cfd1eb6db58
Signed-off-by: Loïc Yavercovski <loic.yavercovski@gmail.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22619
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <ben@nvidia.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...


# cc94f303 23-Apr-2024 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

raid1: handle read errors

If a read fails, try reading from other base bdevs and if that succeeds,
write to the bdev that returned the read error.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewic

raid1: handle read errors

If a read fails, try reading from other base bdevs and if that succeeds,
write to the bdev that returned the read error.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Iffca8921d0177e16f1ac3d661b8b6131f3dbd39f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22974
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...


# 6e950b24 26-Apr-2024 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

raid1: move function to avoid forward declaration later

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ifa1fbf92a9465f24a178c597896d57d821863078
Reviewed-on: https://revie

raid1: move function to avoid forward declaration later

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ifa1fbf92a9465f24a178c597896d57d821863078
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22976
Community-CI: Mellanox Build Bot
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


# d6aa653d 23-Apr-2024 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

raid1: remove common base bdev io completion function

The read error handling code will make raid1_bdev_io_completion() used
only in one place so remove it now. And because reads only use one base
b

raid1: remove common base bdev io completion function

The read error handling code will make raid1_bdev_io_completion() used
only in one place so remove it now. And because reads only use one base
bdev, don't set base_bdev_io_remaining and use raid_bdev_io_complete()
instead of raid_bdev_io_complete_part() in the read completions.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I9d1429bea7b9b4a8ab05bbf3ab67f53c332e95ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22973
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...


# b0b0889e 18-Apr-2024 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

raid1: handle write errors

Fail base bdev on write error. If write to at least one base bdev
succeeds, complete the raid I/O as successful.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel

raid1: handle write errors

Fail base bdev on write error. If write to at least one base bdev
succeeds, complete the raid I/O as successful.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I0315f98937a548648f819bf7e8c5707d7adec991
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22846
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...


Revision tags: LTS, v24.01, v24.05-pre, v24.01-rc1, v23.09, v24.01-pre, v23.09-rc1
# aefa99f1 16-Jun-2023 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

raid1: rebuild support

Change-Id: Ie700c90a787cbc1db1fc858e5d0caf1f6bbedaae
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18

raid1: rebuild support

Change-Id: Ie700c90a787cbc1db1fc858e5d0caf1f6bbedaae
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18740
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot

show more ...


Revision tags: v23.05, v23.09-pre, v23.01.1
# 6e03e49b 22-Mar-2023 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

module/raid: make struct raid_bdev_io_channel private to bdev_raid

Define getters for accessing only the necessary raid_ch data from the
raid modules.

Change-Id: I2622b0d219a3893ba3518b3c749695f6a1

module/raid: make struct raid_bdev_io_channel private to bdev_raid

Define getters for accessing only the necessary raid_ch data from the
raid modules.

Change-Id: I2622b0d219a3893ba3518b3c749695f6a1e57857
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18736
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


# a4e1703e 01-Jun-2023 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

module/raid: put relevant bdev_io data in raid_bdev_io

Everything the raid modules need will be in struct raid_bdev_io, they
won't access spdk_bdev_io fields directly. This will simplify the raid
mo

module/raid: put relevant bdev_io data in raid_bdev_io

Everything the raid modules need will be in struct raid_bdev_io, they
won't access spdk_bdev_io fields directly. This will simplify the raid
modules' code and expose only what's needed. It will also allow easier
implementation of functionality like raid_io splitting (in the following
patches), which needs to alter the io in some way.

Change-Id: I26abf6d3397109a15251d279926ad28d7ea22105
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18734
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


# 030dab89 22-Mar-2023 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

module/raid: remove num_channels from raid_bdev_io_channel

This value is always equal to the number of base bdevs so just use that.

Change-Id: I6b6f2076c28b5f85f7ede212da048f594c54d6a9
Signed-off-b

module/raid: remove num_channels from raid_bdev_io_channel

This value is always equal to the number of base bdevs so just use that.

Change-Id: I6b6f2076c28b5f85f7ede212da048f594c54d6a9
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18711
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <jim.harris@samsung.com>

show more ...


# deed7d2f 16-May-2023 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

module/raid: data offset and data size implementation

When raid bdev is created with superblock parameter then all data on
this bdev should be shifted by some offset. Such space at the beginning
of

module/raid: data offset and data size implementation

When raid bdev is created with superblock parameter then all data on
this bdev should be shifted by some offset. Such space at the beginning
of bdev will be used to store on-disk raid metadata.

Change-Id: I2545a2b00a651ef5332ca1757da0110a63914a43
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15246
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


# 614ca6d2 16-May-2023 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

module/raid: add wrappers for base bdev io functions

These will be used by the next patch for implementing base bdev data
offset.

Change-Id: Ib225474672a6980b797ab21b2b5a118709406dd2
Signed-off-by:

module/raid: add wrappers for base bdev io functions

These will be used by the next patch for implementing base bdev data
offset.

Change-Id: Ib225474672a6980b797ab21b2b5a118709406dd2
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18151
Reviewed-by: Slawomir Ptak <slawomir.ptak@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


Revision tags: v23.01, v23.05-pre, v23.01-rc1, v22.01.2
# a73acd9f 04-Nov-2022 Krzysztof Smolinski <krzysztof.smolinski@intel.com>

raid1: read balancing

Allow using all base devices for reads instead of only the first one.
Keep track of the number of outstanding read blocks for every base bdev
and choose the least busy when han

raid1: read balancing

Allow using all base devices for reads instead of only the first one.
Keep track of the number of outstanding read blocks for every base bdev
and choose the least busy when handling a read I/O.

Here are some performance results. The tests were performed using fio on
2 and 3 drive (Intel P4510 2TB) arrays. Random reads, 1 thread, qd=128,
each run was 1 minute.

WITHOUT read balancing:
n=2 bs=4k : IOPS=804k, BW=3141MiB/s
n=3 bs=4k : IOPS=804k, BW=3140MiB/s
n=2 bsrange=4k-1M : IOPS=6421, BW=3223MiB/s
n=3 bsrange=4k-1M : IOPS=6416, BW=3222MiB/s
WITH read balancing:
n=2 bs=4k : IOPS=1291k, BW=5043MiB/s
n=3 bs=4k : IOPS=1572k, BW=6140MiB/s
n=2 bsrange=4k-1M : IOPS=12.2k, BW=6148MiB/s
n=3 bsrange=4k-1M : IOPS=18.0k, BW=9058MiB/s

Change-Id: I7d85411a6421bd7352031efb562ee95f2c612011
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15271
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...


# 8d1993a5 23-May-2023 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

module/raid: remove bdev pointer from base_bdev_info

There is a spdk_bdev_desc pointer in base_bdev_info, which is always set
together with the bdev pointer, so use that instead. It makes checking
w

module/raid: remove bdev pointer from base_bdev_info

There is a spdk_bdev_desc pointer in base_bdev_info, which is always set
together with the bdev pointer, so use that instead. It makes checking
whether a base bdev is present more consistent. Before, in some places
the bdev pointer was checked and in others the desc pointer.

Change-Id: I5ac305b7d4b07c609b759a59f7f0fa540532ea1e
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18286
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


# 597fbea9 03-Oct-2022 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

raid1: degraded mode support

Properly handle IO when one or more base bdevs are missing.

Change-Id: I51161b01a625c20da5156d7db1c5e5d9b62ce298
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@int

raid1: degraded mode support

Properly handle IO when one or more base bdevs are missing.

Change-Id: I51161b01a625c20da5156d7db1c5e5d9b62ce298
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15266
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot

show more ...


# 72672d49 14-Apr-2023 Artur Paszkiewicz <artur.paszkiewicz@intel.com>

module/raid: specify memory domain support per raid module

Not all raid modules may support memory domains - raid5f currently does
not. Add a parameter to struct raid_bdev_module to specify that.

C

module/raid: specify memory domain support per raid module

Not all raid modules may support memory domains - raid5f currently does
not. Add a parameter to struct raid_bdev_module to specify that.

Change-Id: I3285c118db846d290837606b3f85ac4b5277de97
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17601
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...


# 55f94793 10-Feb-2023 Konrad Sztyber <konrad.sztyber@intel.com>

bdev: remove spdk_bdev_ext_io_opts from spdk_bdev_io

The spdk_bdev_ext_io_opts structure is used to pass extra options when
submitting a bdev IO request, without having to modify/add functions to
ha

bdev: remove spdk_bdev_ext_io_opts from spdk_bdev_io

The spdk_bdev_ext_io_opts structure is used to pass extra options when
submitting a bdev IO request, without having to modify/add functions to
handle new options. Additionally, the structure has a size field to
allow adding new fields without breaking the ABI (and thus having to
bump up the major version of a library).

It is also a part of spdk_bdev_io and there are several reasons for
removing it from that structure:

1. The size field only makes sense in structures that are passed
through pointers. And spdk_bdev_ext_io_opts is indeed passed as a
pointer to spdk_bdev_{readv,writev}_blocks_ext(), however it is
also embedded in spdk_bdev_io (internal.ext_opts_copy), which is
also part of the API. It means that each time a new field is added
to spdk_bdev_ext_io_opts, the size of spdk_bdev_io will also
change, so we will need to bump the major version of libspdk_bdev
anyway, thus making spdk_bdev_ext_io_opts.size useless.
2. The size field also makes internal.ext_opts cumbersome to use, as
each time one of its fields is accessed, we need to check the size.
Currently the code doesn't do that, because all of the existing
spdk_bdev_ext_io_opts fields were present when this structure was
initially introduced, but we'd need to do check the size before
accessing any new fields.
3. spdk_bdev_ext_io_opts has a metadata field, while spdk_bdev_io
already has u.bdev.md_buf, which means that we store the same thing
in several different places in spdk_bdev_io (u.bdev.md_buf,
u.bdev.ext_opts->metadata, internal.ext_opts->metadata).

Therefore, this patch removes all references to spdk_bdev_ext_io_opts
from spdk_bdev_io and replaces them with fields (memory_domain,
memory_domain_ctx) that were missing in spdk_bdev_io. Unfortunately,
this change breaks the API and requires changes in bdev modules that
supported spdk_bdev_io.u.bdev.ext_opts.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I49b7524eb84d1d4d7f12b7ab025fec36da1ee01f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16773
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# 8f424ed8 19-Oct-2022 Krzysztof Smolinski <krzysztof.smolinski@intel.com>

raid1: io metadata support

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: I53a57f85d94110365492d457715f8a8bc1194628
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/s

raid1: io metadata support

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: I53a57f85d94110365492d457715f8a8bc1194628
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15127
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>

show more ...


# 985b7c10 19-Dec-2022 Krzysztof Smolinski <krzysztof.smolinski@intel.com>

raid1: io path implementation

* read/write io path for raid1

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: I1d0321725faf668f72c41d62ec0c6a15113f2b93
Reviewed-on: htt

raid1: io path implementation

* read/write io path for raid1

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: I1d0321725faf668f72c41d62ec0c6a15113f2b93
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13445
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# 208f21cd 28-Nov-2022 Krzysztof Smolinski <krzysztof.smolinski@intel.com>

raid1: module implementation

* added raid1 module functions
* raid1 logical volume can be created using standard SPDK RPC
* strip size parameter not supported by raid1

Signed-off-by: Krzysztof Smol

raid1: module implementation

* added raid1 module functions
* raid1 logical volume can be created using standard SPDK RPC
* strip size parameter not supported by raid1

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Change-Id: Id3ee1ba0ec28540ca8eb67b04c3ff655a16b1f19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13444
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...