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 |
||
---|---|---|
.. | ||
blob_bdev.c | ||
blob.c | ||
bs_dev_common.c | ||
bs_scheduler.c | ||
Makefile |