aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_sysfs.c
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2008-10-01 06:42:20 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-03 13:11:54 -0400
commit0406289ed57955860a4f8d744a14f4c819260ce4 (patch)
treebe91ef3d51f3108469d74c1fa36d10c914ce4c6d /drivers/s390/scsi/zfcp_sysfs.c
parenta1b449de5d35b9eec8981c6ea999eea263b19a0b (diff)
[SCSI] zfcp: Simplify zfcp data structures
Reduce the size of zfcp data structures by removing unused and redundant members. scsi_lun is only the mangled version of the fcp_lun. So, remove the redundant field and use the fcp_lun instead. Since the queue lock and the pci_batch indicator are only used in the request queue, move them from the common queue struct to the adapter struct. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_sysfs.c')
-rw-r--r--drivers/s390/scsi/zfcp_sysfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c
index 7f7384c02a53..2809d789b55c 100644
--- a/drivers/s390/scsi/zfcp_sysfs.c
+++ b/drivers/s390/scsi/zfcp_sysfs.c
@@ -137,6 +137,7 @@ static ssize_t zfcp_sysfs_port_remove_store(struct device *dev,
137 struct zfcp_port *port; 137 struct zfcp_port *port;
138 u64 wwpn; 138 u64 wwpn;
139 int retval = 0; 139 int retval = 0;
140 LIST_HEAD(port_remove_lh);
140 141
141 down(&zfcp_data.config_sema); 142 down(&zfcp_data.config_sema);
142 if (atomic_read(&adapter->status) & ZFCP_STATUS_COMMON_REMOVE) { 143 if (atomic_read(&adapter->status) & ZFCP_STATUS_COMMON_REMOVE) {
@@ -154,7 +155,7 @@ static ssize_t zfcp_sysfs_port_remove_store(struct device *dev,
154 if (port && (atomic_read(&port->refcount) == 0)) { 155 if (port && (atomic_read(&port->refcount) == 0)) {
155 zfcp_port_get(port); 156 zfcp_port_get(port);
156 atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status); 157 atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status);
157 list_move(&port->list, &adapter->port_remove_lh); 158 list_move(&port->list, &port_remove_lh);
158 } else 159 } else
159 port = NULL; 160 port = NULL;
160 write_unlock_irq(&zfcp_data.config_lock); 161 write_unlock_irq(&zfcp_data.config_lock);
@@ -235,6 +236,7 @@ static ssize_t zfcp_sysfs_unit_remove_store(struct device *dev,
235 struct zfcp_unit *unit; 236 struct zfcp_unit *unit;
236 u64 fcp_lun; 237 u64 fcp_lun;
237 int retval = 0; 238 int retval = 0;
239 LIST_HEAD(unit_remove_lh);
238 240
239 down(&zfcp_data.config_sema); 241 down(&zfcp_data.config_sema);
240 if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_REMOVE) { 242 if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_REMOVE) {
@@ -252,7 +254,7 @@ static ssize_t zfcp_sysfs_unit_remove_store(struct device *dev,
252 if (unit && (atomic_read(&unit->refcount) == 0)) { 254 if (unit && (atomic_read(&unit->refcount) == 0)) {
253 zfcp_unit_get(unit); 255 zfcp_unit_get(unit);
254 atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &unit->status); 256 atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &unit->status);
255 list_move(&unit->list, &port->unit_remove_lh); 257 list_move(&unit->list, &unit_remove_lh);
256 } else 258 } else
257 unit = NULL; 259 unit = NULL;
258 260