Spdk/lib/blob
Jim Harris 037c8b01a1 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
2023-03-15 09:27:17 +00:00
..
blob_bs_dev.c blob: Add translate_lba operation 2022-12-08 12:54:54 +00:00
blobstore.c blob: remove short-circuiting path for blob_freeze 2023-03-15 09:27:17 +00:00
blobstore.h blob: pass bs context with esnap_bs_dev_create 2023-03-13 07:57:24 +00:00
Makefile so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
request.c blob: Use bdev copy command in CoW flow if supported 2022-12-08 12:54:54 +00:00
request.h blob: Use bdev copy command in CoW flow if supported 2022-12-08 12:54:54 +00:00
spdk_blob.map blob: clones of external snapshots 2023-03-03 11:25:35 +00:00
zeroes.c blob: Add translate_lba operation 2022-12-08 12:54:54 +00:00