+3
−0
+3
−1
+19
−0
+6
−2
+7
−0
Loading
Writing to unallocated cluster triggers copy-on-write sequence. If this cluster is backed by zeroes device we can skip the copy part. For a simple thin provisioned volume copy this shortcut is already implemented because `blob->parent_id == SPDK_BLOBID_INVALID`. But this will not work for thin provisioned volumes created from snapshot. In this case we need to traverse the whole stack of underlying `spdk_bs_dev` devices for specific cluster to check if it is zeroes backed. This patch adds `is_zeroes` operation to `spdk_bs_dev`. For zeroes device it always returns 'true', for real bdev (`blob_bs_dev`) always returns false, for another layer of `blob_bs_dev` does lba conversion and forwards to backing device. In blobstore's cluster copy flow we check if cluster is backed by zeroes device and skip copy part if it is. Signed-off-by:Evgeniy Kochetov <evgeniik@nvidia.com> Change-Id: I640773ac78f8f466b96e96a34c3a6c3c91f87dab Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13446 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com>