mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 11:41:26 +00:00
Cleanup: CONFIG_SCST_ORDERED_READS removed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3206 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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.
|
||||
*************************************************************/
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user