From 70150cb9129db9f5938c590a3629259adb17a2e0 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 12 Feb 2019 03:07:54 +0000 Subject: [PATCH] scst: Remove the exec_sync flag Since all device handlers have at least one asynchronous mode, remove the exec_sync flag. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7919 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- doc/scst_pg.sgml | 10 ++-------- scst/include/scst.h | 11 ++--------- scst/src/dev_handlers/scst_vdisk.c | 2 -- scst/src/scst_targ.c | 2 +- 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/doc/scst_pg.sgml b/doc/scst_pg.sgml index eb2475b12..c75dddf82 100644 --- a/doc/scst_pg.sgml +++ b/doc/scst_pg.sgml @@ -563,8 +563,6 @@ struct scst_dev_type unsigned no_proc:1; - unsigned exec_sync:1; - unsigned pr_cmds_notifications:1; int threads_num; @@ -607,9 +605,6 @@ execution in the atomic (non-sleeping) context. -If this function provides sync execution, you should set -exec_sync flag and consider to setup dedicated threads by -setting 0. +If this function provides sync execution, you should consider to setup +dedicated threads by setting 0. Optional, if not set, the commands will be sent directly to SCSI device. diff --git a/scst/include/scst.h b/scst/include/scst.h index 78c0d1973..b96a778ee 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -1381,12 +1381,6 @@ struct scst_dev_type { unsigned no_proc:1; #endif - /* - * Should be true, if exec() is synchronous. This is a hint to SCST core - * to optimize commands order management. - */ - unsigned exec_sync:1; - /* * Should be set if the device wants to receive notification of * Persistent Reservation commands (PR OUT only) @@ -1454,9 +1448,8 @@ struct scst_dev_type { * - SCST_EXEC_NOT_COMPLETED - the cmd should be sent to SCSI * mid-level. * - * If this function provides sync execution, you should set - * exec_sync flag and consider to setup dedicated threads by - * setting threads_num > 0. + * If this function provides sync execution, you should to set up + * dedicated threads by setting threads_num > 0. * * Dev handlers implementing internal queuing in their exec() callback * should call scst_check_local_events() just before the actual diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 884f6d827..8899bddeb 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -760,7 +760,6 @@ static vdisk_op_fn nullio_ops[256]; static struct scst_dev_type vdisk_file_devtype = { .name = "vdisk_fileio", .type = TYPE_DISK, - .exec_sync = 1, .threads_num = -1, .parse_atomic = 1, .dev_done_atomic = 1, @@ -922,7 +921,6 @@ static struct scst_dev_type vdisk_null_devtype = { static struct scst_dev_type vcdrom_devtype = { .name = "vcdrom", .type = TYPE_ROM, - .exec_sync = 1, .threads_num = -1, .parse_atomic = 1, .dev_done_atomic = 1, diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 0c23accc9..651b45de4 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -953,7 +953,7 @@ int scst_pre_parse(struct scst_cmd *cmd) #ifdef CONFIG_SCST_STRICT_SERIALIZING cmd->inc_expected_sn_on_done = 1; #else - cmd->inc_expected_sn_on_done = devt->exec_sync || cmd->cmd_naca || + cmd->inc_expected_sn_on_done = cmd->cmd_naca || (!dev->has_own_order_mgmt && (dev->queue_alg == SCST_QUEUE_ALG_0_RESTRICTED_REORDER || cmd->queue_type == SCST_CMD_QUEUE_ORDERED));