Spdk/test/unit/lib
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
..
accel accel: don't modify user iovs when allocating buffers 2023-03-13 21:02:27 +00:00
bdev bdev/crypto: memory domain support 2023-03-13 21:02:27 +00:00
blob blob: track last md_page index correctly during resize 2023-03-15 09:27:17 +00:00
blobfs update Intel copyright notices 2022-11-10 08:28:53 +00:00
dma Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
env_dpdk update Intel copyright notices 2022-11-10 08:28:53 +00:00
event thread: use spdk_thread_get_app_thread instead of _spdk_get_app_thread 2023-02-24 12:46:27 +00:00
ftl update Intel copyright notices 2022-11-10 08:28:53 +00:00
idxd update Intel copyright notices 2022-11-10 08:28:53 +00:00
init subsystem: assert all subsystems initialized on app thread 2022-11-23 08:22:04 +00:00
ioat update Intel copyright notices 2022-11-10 08:28:53 +00:00
iscsi iscsi: fix segfault when r2t 2022-11-29 17:21:18 +00:00
json json: add spdk_json_write_named_double 2022-11-22 10:01:43 +00:00
jsonrpc update Intel copyright notices 2022-11-10 08:28:53 +00:00
log log: add deprecated tracking API 2022-12-07 17:45:53 +00:00
lvol update Intel copyright notices 2022-11-10 08:28:53 +00:00
notify update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme nvme: Add unit test for nvme_ctrlr_disable() and _poll() 2023-03-09 23:31:15 +00:00
nvmf nvme/tcp: Remove iov_sgl from PDU structure 2023-03-10 11:43:40 +00:00
rdma rdma: Maintain per device PD which is persistent across reconnect 2022-08-12 08:59:43 +00:00
reduce bdev/compress: Port to use accel_fw instead of compressdev 2023-01-20 10:26:21 +00:00
rpc update Intel copyright notices 2022-11-10 08:28:53 +00:00
scsi update Intel copyright notices 2022-11-10 08:28:53 +00:00
sock sock/uring: Flushing a socket not in a group still attempts to send 2023-01-19 17:34:01 +00:00
thread lib/thread: iobuf get/put functions will not add offset 2023-01-16 08:35:33 +00:00
util util: add spdk_iov_xfer_*() API 2023-01-30 16:28:35 +00:00
vhost misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
json_mock.c virtio_blk: add dump opts 2023-01-20 18:57:38 +00:00
Makefile configure: rename --with-reduce --with-vbdev-compress 2022-12-08 12:55:27 +00:00