390105b0 | 20-Feb-2024 |
Mateusz Kozlowski <mateusz.kozlowski@solidigm.com> |
test/blob: Verify unmap releases clusters
New UT checks if unmaps send to thin provisioned blob cause the release of clusters.
Change-Id: I270721187e48cc9ffe59ee1367eb4824b3158dd8 Signed-off-by: Ma
test/blob: Verify unmap releases clusters
New UT checks if unmaps send to thin provisioned blob cause the release of clusters.
Change-Id: I270721187e48cc9ffe59ee1367eb4824b3158dd8 Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@solidigm.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21932 Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <ben@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <jim.harris@samsung.com>
show more ...
|
c5afa2a0 | 09-Jan-2024 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
lib/blob: allow growing in size in increments less than cluster size
By omission the blobstore could only be grown in increments of cluster size. For smaller values the grow would fail, yet that val
lib/blob: allow growing in size in increments less than cluster size
By omission the blobstore could only be grown in increments of cluster size. For smaller values the grow would fail, yet that value would still be updated on bs reload. No change in cluster count would still happen.
It was unnecessary to wait, so now it goes through whole grow path. In practice only the super block value for device size changes.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I62684d745ea31daf110e8ff62751930f38b95199 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21286 Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <jim.harris@samsung.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
show more ...
|
87666f52 | 11-Apr-2023 |
Mike Gerdts <mgerdts@nvidia.com> |
blob: esnap clones are not clones
spdk_blob_is_clone() should return true only for normal clones. To detect esnap clones, use spdk_blob_is_esnap_clone(). This also clarifies documentation of spdk_bl
blob: esnap clones are not clones
spdk_blob_is_clone() should return true only for normal clones. To detect esnap clones, use spdk_blob_is_esnap_clone(). This also clarifies documentation of spdk_blob_is_esnap_clone() to match the implementation.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: I9993ab60c1a097531a46fb6760124a632f6857cd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17544 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
09bf2b20 | 06-Apr-2023 |
Mike Gerdts <mgerdts@nvidia.com> |
blob: add spdk_blob_is_degraded()
In preparation for supporting degraded lvols, spdk_blob_is_degraded() is added. To support this, bs_dev gains an optional is_degraded() callback. spdk_blob_is_degra
blob: add spdk_blob_is_degraded()
In preparation for supporting degraded lvols, spdk_blob_is_degraded() is added. To support this, bs_dev gains an optional is_degraded() callback. spdk_blob_is_degraded() returns false so long as no bs_dev that the blob depends on is degraded. Depended upon bs_devs include the blobstore's device and the blob's back_bs_dev.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: Ib02227f5735b00038ed30923813e1d5b57deb1ab Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17516 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
aaebaece | 14-Oct-2022 |
Mike Gerdts <mgerdts@nvidia.com> |
blob: hotplug new back_bs_dev
When an esnap clone blob's external snapshot arrives after the blob is opened, it can now be hot-added to the blob. Presumably the new device replaces a place-holder de
blob: hotplug new back_bs_dev
When an esnap clone blob's external snapshot arrives after the blob is opened, it can now be hot-added to the blob. Presumably the new device replaces a place-holder device that did not really atteempt IO.
Change-Id: I622feb84efa66628debf44f7e7cb88b6a012db6d Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16232 Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
ba91ffba | 06-Oct-2022 |
Mike Gerdts <mgerdts@nvidia.com> |
blob: defer unload until channel destroy done
As the blobstore is being unlaoded, async esnap channel destructions may be in flight. In such a case, spdk_bs_unload() needs to defer the unload of the
blob: defer unload until channel destroy done
As the blobstore is being unlaoded, async esnap channel destructions may be in flight. In such a case, spdk_bs_unload() needs to defer the unload of the blobstore until channel destructions are complete.
The following commands lead to the illustrated states.
bdev_malloc_create -b malloc0 bdev_lvol_clone_bdev lvs1 malloc0 eclone
.---------. .--------. | malloc0 |<--| eclone | `---------' `--------'
bdev_lvol_snapshot lvs1/eclone snap
.---------. .------. .--------. | malloc0 |<--| snap |<--| eclone | `---------' `------' `--------'
bdev_lvol_clone lvs1/snap eclone
.--------. ,-| eclone | .---------. .------.<-' `--------' | malloc0 |<--| snap | `---------' `------'<-. .-------. `-| clone | `-------'
As the blobstore is preparing to be unloaded spdk_blob_unload(snap) is called once for eclone, once for clone, and once for snap. The last of these calls happens just before spdk_bs_unload() is called. spdk_blob_unload() needs to destroy channels on each thread. During this thread iteration, spdk_bs_unload() starts. The work performed in the iteration maintains a reference to the blob, and as such it spdk_bs_unload() cannot do its work until the iteration is complete.
Change-Id: Id9b92ad73341fb3437441146110055c84ee6dc52 Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14975 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
652232ae | 25-Jan-2022 |
Mike Gerdts <mgerdts@nvidia.com> |
blob: esnap clone inflate and decouple
This adds support for inflate and decouple for esnap clones. Since there are no immediate consumers that will provide back_bs_dev->is_zeroes() that can return
blob: esnap clone inflate and decouple
This adds support for inflate and decouple for esnap clones. Since there are no immediate consumers that will provide back_bs_dev->is_zeroes() that can return true, a shortcut is taken in that inflate and decouple of esnap clones are the same.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: I4d2e6565126991acd650f073ce876466334e986d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11574 Reviewed-by: Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
94c43313 | 25-Jan-2022 |
Mike Gerdts <mgerdts@nvidia.com> |
blob: snapshots of esnap clones
An esnap clone needs special handling as snapshots are created and removed. In particular: the following must exist on the blob that directly references the external
blob: snapshots of esnap clones
An esnap clone needs special handling as snapshots are created and removed. In particular: the following must exist on the blob that directly references the external snapshot and must be removed from others:
- Ensure SPDK_BLOB_EXTERNAL_SNAPSHOT invalid flag exists only on the esnap clone. - Ensure BLOB_EXTERNAL_SNAPSHOT_ID internal xattr exists only on the esnap clone. - Clean up any esnap IO channels on a blob that is no longer an esnap clone due to snapshot creation or removal.
See the diagrams and description in blob_esnap_clone_snapshot() in blob_ut.c for details.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: Ie4125d64d5bac9cfa7d6c7cc9a543d72a169f6ee Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11573 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
show more ...
|
c64ce716 | 18-Feb-2023 |
Mike Gerdts <mgerdts@nvidia.com> |
blob: add spdk_blob_is_esnap_clone
Add an API to easily determine if a blob is an esnap clone, similar to what already exists for snapshot, clone, and thin_provisioned.
Signed-off-by: Mike Gerdts <
blob: add spdk_blob_is_esnap_clone
Add an API to easily determine if a blob is an esnap clone, similar to what already exists for snapshot, clone, and thin_provisioned.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: Ie07cd09b30513893e82f1c85e94a24a93c79d71e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16862 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Community-CI: Mellanox Build Bot
show more ...
|
7c3c0b66 | 10-Mar-2023 |
Jim Harris <james.r.harris@intel.com> |
blob: track last md_page index correctly during resize
During resize, we correctly determine if we have enough md_pages for new extent pages, before proceeding with actually allocating clusters and
blob: track last md_page index correctly during resize
During resize, we correctly determine if we have enough md_pages for new extent pages, before proceeding with actually allocating clusters and associated extent pages.
But during actual allocation, we were incrementing the lfmd output parameter, which was incorrect. Technically we should increment it any time bs_allocate_cluster() allocated an md_page. But it's also fine to just not increment it at the call site at all - worst case, we just check that bit index again which isn't going to cause a performance problem.
Also add a unit test that demonstrated the original problem, and works fine with this patch.
Fixes issue #2932.
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Iba177a66e880fb99363944ee44d3d060a44a03a4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17150 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: 阿克曼 <lilei.777@bytedance.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Community-CI: Mellanox Build Bot
show more ...
|
037c8b01 | 10-Mar-2023 |
Jim Harris <james.r.harris@intel.com> |
blob: remove short-circuiting path for blob_freeze
If blob_freeze_io() is called twice in a row, and the second time occurs before the for_each_channel for the first completes, the second caller wil
blob: remove short-circuiting path for blob_freeze
If blob_freeze_io() is called twice in a row, and the second time occurs before the for_each_channel for the first completes, the second caller will receive its callback too soon.
Instead just simplify the whole process, always do the for_each_channel and don't try to optimize it at all. These are infrequent operations - correctness and simplicity are in order.
A few additional changes:
1) Make same changes for unfreeze path. 2) Add blob_verify_md_op() calls, just to be sure these are only called from md_thread. This was already checked in calling functions, but as these functions get called from new code paths (i.e. esnap clones) it can't hurt to add additional checks. 3) Add unit test that failed with original code, but passes with this patch.
Fixes issue #2935.
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ibefba554547ddf3e26aaabfa4288c8073d3c04ff Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17148 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Mike Gerdts <mgerdts@nvidia.com> Community-CI: Mellanox Build Bot
show more ...
|
ce67e0c7 | 21-Sep-2022 |
Mike Gerdts <mgerdts@nvidia.com> |
blob: clones of external snapshots
This is the beginning of support for external snapshots. An external snapshot is a read-only blobstore device (struct spdk_bs_dev) that can be used as a blob's bac
blob: clones of external snapshots
This is the beginning of support for external snapshots. An external snapshot is a read-only blobstore device (struct spdk_bs_dev) that can be used as a blob's back device. Normally a blob will have no back device (a normal blob), a zeroes back device (a thin provisioned blob), or a blob back device (a clone blob). When a blob has an external snapshot ("esnap") as its back device, it is called an esnap clone.
With this patch, esnap clones can be created but they are not yet useful. Subsequent patches in the series will plumb the IO path, enable various features, and allow lvol bdevs to be esnap clones.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: I29206b628a2b03b6386a88532565e228df988e0e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14969 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>
show more ...
|
0f4bfd55 | 06-Feb-2023 |
Mike Gerdts <mgerdts@nvidia.com> |
test/blob: test with and without copy offload
Perform all tests on devices that do and do not support spdk_bs_dev::copy.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: Ic4c13ade9f45709b
test/blob: test with and without copy offload
Perform all tests on devices that do and do not support spdk_bs_dev::copy.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: Ic4c13ade9f45709b34a57f9fb7456d6c6a790a85 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16691 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
show more ...
|