| ab2eff07 | 11-Jan-2023 |
Mike Gerdts <mgerdts@nvidia.com> |
blob_bdev: take read-only-many claims on ro devs
If the bs_dev was opened read-write, continue to take a read-many-write-one claim. If it was opened read-only, take a read-many-write-none claim.
Si
blob_bdev: take read-only-many claims on ro devs
If the bs_dev was opened read-write, continue to take a read-many-write-one claim. If it was opened read-only, take a read-many-write-none claim.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: I25d977c6961f962423899fb891ec912cd847930a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16282 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
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 ...
|
| b7bfa504 | 22-Aug-2022 |
Evgeniy Kochetov <evgeniik@nvidia.com> |
blob: Use bdev copy command in CoW flow if supported
Copy-on-write happens when cluster is written for the first time for thin provisioned volume. Currently it is implemented as two separate request
blob: Use bdev copy command in CoW flow if supported
Copy-on-write happens when cluster is written for the first time for thin provisioned volume. Currently it is implemented as two separate requests to underlying bdev: read of the whole cluster to bounce buffer and then write of this buffer to the new location on the same underlying bdev.
This patch improves copy-on-write flow by utilizing copy command of underlying bdev if it is supported. In this case we have just one request to bdev and don't need the bounce buffer.
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com> Change-Id: I92552e0f18f7a41820d589e7bb1e86160c69183f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14351 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: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
show more ...
|