+6
−1
Loading
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> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17150 (master) (cherry picked from commit 7c3c0b66) Change-Id: Iba177a66e880fb99363944ee44d3d060a44a03a4 Signed-off-by:
Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17702 Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>