From f6d5b9cd92a82c0efc973b9fd354eb1e6d5c9c21 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Tue, 20 Apr 2021 18:05:33 +0800 Subject: [PATCH] bdev: introduce unmap attributes to bdev layer The backend device module can report such capabilities to the bdev layer, and we can split unmap request into multiple children requests in the bdev layer. Change-Id: I81daf7e58b797a2673ef102f2a037de20771092e Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7515 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- include/spdk/bdev_module.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/spdk/bdev_module.h b/include/spdk/bdev_module.h index f30083ee1..86876a4cc 100644 --- a/include/spdk/bdev_module.h +++ b/include/spdk/bdev_module.h @@ -343,6 +343,12 @@ struct spdk_bdev { /* Maximum number of segments in a I/O */ uint32_t max_num_segments; + /* Maximum unmap in unit of logical block */ + uint32_t max_unmap; + + /* Maximum unmap block segments */ + uint32_t max_unmap_segments; + /** * UUID for this bdev. *