diff --git a/scst/include/scst.h b/scst/include/scst.h index 02a0f0522..f6a3a5e2b 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -2217,9 +2217,6 @@ struct scst_device { /* Memory limits for this device */ struct scst_mem_lim dev_mem_lim; - /* How many write cmds alive on this dev. Temporary, ToDo */ - atomic_t write_cmd_count; - /************************************************************* ** Persistent reservation fields. Protected by dev_pr_mutex. *************************************************************/ diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 98a8fc405..f641b08bf 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -2580,7 +2580,6 @@ int scst_alloc_device(gfp_t gfp_mask, struct scst_device **out_dev) dev->handler = &scst_null_devtype; atomic_set(&dev->dev_cmd_count, 0); - atomic_set(&dev->write_cmd_count, 0); scst_init_mem_lim(&dev->dev_mem_lim); spin_lock_init(&dev->dev_lock); INIT_LIST_HEAD(&dev->blocked_cmd_list); diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 481e32333..b90cb39f2 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -39,13 +39,8 @@ #include "scst_priv.h" #include "scst_pres.h" -#if 0 /* Temporary left for future performance investigations */ -/* Deleting it don't forget to delete write_cmd_count */ -#define CONFIG_SCST_ORDERED_READS -#endif - #if 0 /* Let's disable it for now to see if users will complain about it */ -/* Deleting it don't forget to delete write_cmd_count */ +/* Deleting it don't forget to delete dev_cmd_count */ #define CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT #endif @@ -3294,11 +3289,6 @@ static int scst_pre_xmit_response(struct scst_cmd *cmd) atomic_dec(&cmd->tgt_dev->tgt_dev_cmd_count); #ifdef CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT atomic_dec(&cmd->dev->dev_cmd_count); -#endif -#ifdef CONFIG_SCST_ORDERED_READS - /* If expected values not set, expected direction is UNKNOWN */ - if (cmd->expected_data_direction & SCST_DATA_WRITE) - atomic_dec(&cmd->dev->write_cmd_count); #endif if (unlikely(cmd->queue_type == SCST_CMD_QUEUE_HEAD_OF_QUEUE)) scst_on_hq_cmd_response(cmd); @@ -3590,14 +3580,6 @@ static void scst_cmd_set_sn(struct scst_cmd *cmd) switch (cmd->queue_type) { case SCST_CMD_QUEUE_SIMPLE: case SCST_CMD_QUEUE_UNTAGGED: -#ifdef CONFIG_SCST_ORDERED_READS - if (scst_cmd_is_expected_set(cmd)) { - if ((cmd->expected_data_direction == SCST_DATA_READ) && - (atomic_read(&cmd->dev->write_cmd_count) == 0)) - goto ordered; - } else - goto ordered; -#endif if (likely(tgt_dev->num_free_sn_slots >= 0)) { /* * atomic_inc_return() implies memory barrier to sync @@ -3787,12 +3769,6 @@ static int __scst_init_cmd(struct scst_cmd *cmd) } #endif -#ifdef CONFIG_SCST_ORDERED_READS - /* If expected values not set, expected direction is UNKNOWN */ - if (cmd->expected_data_direction & SCST_DATA_WRITE) - atomic_inc(&cmd->dev->write_cmd_count); -#endif - if (unlikely(failure)) goto out_busy;