Spdk/lib/lvol
Mike Gerdts fe0344ec74 lvol: pass non-NULL lvs and lvol to dev_create
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>
2023-04-05 19:18:17 +00:00
..
lvol.c lvol: pass non-NULL lvs and lvol to dev_create 2023-04-05 19:18:17 +00:00
Makefile so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
spdk_lvol.map lvol: add support for external snapshots 2023-04-05 19:18:17 +00:00