Spdk/test/unit/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_bdev.c blob_bdev: take read-only-many claims on ro devs 2023-03-03 11:25:35 +00:00
blob.c blob: track last md_page index correctly during resize 2023-03-15 09:27:17 +00:00
bs_dev_common.c test/blob: test with and without copy offload 2023-03-03 11:25:35 +00:00
bs_scheduler.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
Makefile test/blob: create unit test for blob_bdev 2023-02-09 11:20:34 +00:00