tree 87e70ac102f2498214f42e8f0ad879513669881b
parent bf341919dbc1fbcbb565fb3224c840760ebd9f85
author <[EMAIL PROTECTED]> Mon, 18 Apr 2005 00:57:29 -0500
committer James Bottomley <[EMAIL PROTECTED]> Mon, 18 Apr 2005 22:35:31 -0500
[PATCH] scsi: remove volatile from scsi data
This patch removes volatile qualifier from scsi_device->device_busy,
Scsi_Host->host_busy and ->host_failed as the volatile qualifiers
don't serve any purpose now. While at it, convert those fields from
unsigned short to unsigned int as suggested by Christoph.
Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
scsi/scsi_device.h | 3 ++-
scsi/scsi_host.h | 10 ++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
Index: include/scsi/scsi_device.h
===================================================================
--- 9ff0bb375ccd709b018eccd6d338bf18b9c898aa/include/scsi/scsi_device.h
(mode:100644 sha1:07d974051b0c10b1381ea4b0a675076fe5210e71)
+++ 87e70ac102f2498214f42e8f0ad879513669881b/include/scsi/scsi_device.h
(mode:100644 sha1:7099d2ce967e673c43b64ca6404fc1015be93dcb)
@@ -43,7 +43,8 @@
struct list_head siblings; /* list of all devices on this host */
struct list_head same_target_siblings; /* just the devices sharing
same target id */
- volatile unsigned short device_busy; /* commands actually active on
low-level */
+ unsigned int device_busy; /* commands actually active on
+ * low-level. protected by queue_lock.
*/
spinlock_t sdev_lock; /* also the request queue_lock */
spinlock_t list_lock;
struct list_head cmd_list; /* queue of in use SCSI Command
structures */
Index: include/scsi/scsi_host.h
===================================================================
--- 9ff0bb375ccd709b018eccd6d338bf18b9c898aa/include/scsi/scsi_host.h
(mode:100644 sha1:27f2c4e8943ac35941cdbe36c9bd929ced644b79)
+++ 87e70ac102f2498214f42e8f0ad879513669881b/include/scsi/scsi_host.h
(mode:100644 sha1:1cee1e100943dafe00c14d5329b73659062a4d1a)
@@ -448,8 +448,14 @@
wait_queue_head_t host_wait;
struct scsi_host_template *hostt;
struct scsi_transport_template *transportt;
- volatile unsigned short host_busy; /* commands actually active on
low-level */
- volatile unsigned short host_failed; /* commands that failed. */
+
+ /*
+ * The following two fields are protected with host_lock;
+ * however, eh routines can safely access during eh processing
+ * without acquiring the lock.
+ */
+ unsigned int host_busy; /* commands actually active on
low-level */
+ unsigned int host_failed; /* commands that failed. */
unsigned short host_no; /* Used for IOCTL_GET_IDLUN, /proc/scsi et al.
*/
int resetting; /* if set, it means that last_reset is a valid value */
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html