[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>
This commit is contained in:
Christof Schmitt
2008-10-01 12:42:20 +02:00
committed by James Bottomley
parent a1b449de5d
commit 0406289ed5
9 changed files with 77 additions and 113 deletions

View File

@@ -105,13 +105,17 @@ static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *adapter,
{
struct zfcp_port *port;
struct zfcp_unit *unit;
int scsi_lun;
list_for_each_entry(port, &adapter->port_list_head, list) {
if (!port->rport || (id != port->rport->scsi_target_id))
continue;
list_for_each_entry(unit, &port->unit_list_head, list)
if (lun == unit->scsi_lun)
list_for_each_entry(unit, &port->unit_list_head, list) {
scsi_lun = scsilun_to_int(
(struct scsi_lun *)&unit->fcp_lun);
if (lun == scsi_lun)
return unit;
}
}
return NULL;