mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 12:41:26 +00:00
Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4763 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -36,6 +36,10 @@
|
||||
#endif
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#if 0 /* Let's disable it for now to see if users will complain about it */
|
||||
#define CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT
|
||||
#endif
|
||||
|
||||
/* #define CONFIG_SCST_PROC */
|
||||
|
||||
#ifdef CONFIG_SCST_PROC
|
||||
@@ -2351,14 +2355,17 @@ struct scst_device {
|
||||
/**************************************************************/
|
||||
|
||||
/*
|
||||
* How many cmds alive on this dev. Modified independently to the
|
||||
* above fields, hence the alignment. Gcc reported to have
|
||||
* a long standing bug, when it uses 64-bit memory accesses for
|
||||
* int bit fields, so this alignment must be here to workaroud it.
|
||||
* Device lock. Modified independently to the above fields, hence
|
||||
* the alignment. Gcc reported to have a long standing bug, when
|
||||
* it uses 64-bit memory accesses for int bit fields, so this
|
||||
* alignment must be here to workaroud it.
|
||||
*/
|
||||
atomic_t dev_cmd_count __aligned(sizeof(long));
|
||||
spinlock_t dev_lock __aligned(sizeof(long));
|
||||
|
||||
spinlock_t dev_lock; /* device lock */
|
||||
#ifdef CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT
|
||||
/* How many cmds alive on this dev */
|
||||
atomic_t dev_cmd_count;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* How many times device was blocked for new cmds execution.
|
||||
|
||||
@@ -3380,7 +3380,9 @@ int scst_alloc_device(gfp_t gfp_mask, struct scst_device **out_dev)
|
||||
}
|
||||
|
||||
dev->handler = &scst_null_devtype;
|
||||
#ifdef CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT
|
||||
atomic_set(&dev->dev_cmd_count, 0);
|
||||
#endif
|
||||
scst_init_mem_lim(&dev->dev_mem_lim);
|
||||
spin_lock_init(&dev->dev_lock);
|
||||
INIT_LIST_HEAD(&dev->blocked_cmd_list);
|
||||
|
||||
@@ -38,11 +38,6 @@
|
||||
#include "scst_priv.h"
|
||||
#include "scst_pres.h"
|
||||
|
||||
#if 0 /* Let's disable it for now to see if users will complain about it */
|
||||
/* Deleting it don't forget to delete dev_cmd_count */
|
||||
#define CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT
|
||||
#endif
|
||||
|
||||
static void scst_cmd_set_sn(struct scst_cmd *cmd);
|
||||
static int __scst_init_cmd(struct scst_cmd *cmd);
|
||||
static struct scst_cmd *__scst_find_cmd_by_tag(struct scst_session *sess,
|
||||
|
||||
Reference in New Issue
Block a user