Spdk/lib/blob
Jim Harris 7c3c0b6630 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
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: track last md_page index correctly during resize 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