If an lvol is opened by way of spdk_bs_blob_open() or spontaneously due to blobstore activity (e.g. the blobstore is loading), the esnap_bs_dev_create callback is called with blob_ctx equal to NULL. Under ideal circumstances, blob_ctx refers to the lvol that is being opened. With this change, a NULL blob_ctx triggers lvs_esnap_bs_dev_create() to look through the lvstore's volumes to find the one that uses a blob id that matches the id of the blob that is passed in. Now, lvol library consumers that need to support snapshots can count on both bs_ctx (lvs) and blob_ctx (lvol) to be non-NULL. Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: Iaaa9cc27664e28e54f0fbd75afe1d6ffbad92580 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16588 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> |
||
---|---|---|
.. | ||
lvol.c | ||
Makefile | ||
spdk_lvol.map |