From 302990ac3b1b1a2b7b66f59a5c88038a51fbe18e Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Sat, 27 Feb 2021 11:00:02 -0600 Subject: scsi: target: core: Fix backend plugging target_core_iblock is plugging and unplugging on every command and this is causing perf issues for drivers that prefer batched cmds. With recent patches we can now take multiple cmds from a fabric driver queue and then pass them down the backend drivers in a batch. This patch adds this support by adding 2 callouts to the backend for plugging and unplugging the device. Subsequent commits will add support for iblock and tcmu device plugging. Link: https://lore.kernel.org/r/20210227170006.5077-22-michael.christie@oracle.com Reviewed-by: Bodo Stroesser Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen --- include/target/target_core_backend.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/target/target_core_backend.h') diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index ce2fba49c95d..1f78b09bba55 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h @@ -34,6 +34,8 @@ struct target_backend_ops { int (*configure_device)(struct se_device *); void (*destroy_device)(struct se_device *); void (*free_device)(struct se_device *device); + struct se_dev_plug *(*plug_device)(struct se_device *se_dev); + void (*unplug_device)(struct se_dev_plug *se_plug); ssize_t (*set_configfs_dev_params)(struct se_device *, const char *, ssize_t); -- cgit v1.2.3-59-g8ed1b