+173
−239
+1
−2
Loading
The compaction process is changed to work with single IO buffer instead of using IO vectors. This change will be helpful for bottom block devices when they need to split IO. The compaction flow consists of the following steps: 1. Check if compaction is required and if there are available compactors to use (see compaction_process). The compactor is activated. 2. Collect blocks to read. Fill the compactor request's entries (see compaction_process_start). Only valid NV cache blocks will be moved. 3. Read the selected blocks (see compaction_process_read). 4. Perform the pinning process of LBAs being compacted (see compaction_process_pin_lba). 5. Perform final validation to determine if blocks can be moved. The block is moved when the current L2P address points to the same block. If it differs, the request entry is invalidated (see compaction_process_finish_read). 6. Schedule the request to the writer if it contains valid blocks. 7. Finish the write and update L2P tables to new locations (see compaction_process_ftl_done). 8. Deactivate the compactor. Change-Id: I1019faca478e964273206422f4a8ac43b9374bcb Signed-off-by:Mariusz Barczak <Mariusz.Barczak@solidigmtechnology.com> Signed-off-by:
Mateusz Kozlowski <mateusz.kozlowski@solidigm.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18543 Reviewed-by:
Artur Paszkiewicz <artur.paszkiewicz@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Ben Walker <ben@nvidia.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com> Community-CI: Mellanox Build Bot