aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_sysfs.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2008-10-01 06:42:17 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-03 13:11:53 -0400
commit5ab944f97e09a3d52951fe903eed9a7b88d810b2 (patch)
tree266171323bd7c5dfc433efd70ca19aafc891598c /drivers/s390/scsi/zfcp_sysfs.c
parent44cc76f2d154aa24340354b4711a0fe7f8f08adc (diff)
[SCSI] zfcp: attach and release SAN nameserver port on demand
Changing the zfcp behaviour from always having the nameserver port open to an on-demand strategy. This strategy reduces the use of limited resources like port connections. The patch provides a common infrastructure which could be used for all WKA ports in future. Also reduce the number of nameserver lookups by changing the zfcp behaviour of always querying the nameserver for the corresponding destination ID of the remote port. If the destination ID has changed during the reopen process we will be informed and then trigger a nameserver query on demand. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.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.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c
index 7e857571fe44..430e486e9183 100644
--- a/drivers/s390/scsi/zfcp_sysfs.c
+++ b/drivers/s390/scsi/zfcp_sysfs.c
@@ -273,22 +273,7 @@ out:
273} 273}
274static DEVICE_ATTR(unit_remove, S_IWUSR, NULL, zfcp_sysfs_unit_remove_store); 274static DEVICE_ATTR(unit_remove, S_IWUSR, NULL, zfcp_sysfs_unit_remove_store);
275 275
276static struct attribute *zfcp_port_ns_attrs[] = { 276static struct attribute *zfcp_port_attrs[] = {
277 &dev_attr_port_failed.attr,
278 &dev_attr_port_in_recovery.attr,
279 &dev_attr_port_status.attr,
280 &dev_attr_port_access_denied.attr,
281 NULL
282};
283
284/**
285 * zfcp_sysfs_ns_port_attrs - sysfs attributes for nameserver
286 */
287struct attribute_group zfcp_sysfs_ns_port_attrs = {
288 .attrs = zfcp_port_ns_attrs,
289};
290
291static struct attribute *zfcp_port_no_ns_attrs[] = {
292 &dev_attr_unit_add.attr, 277 &dev_attr_unit_add.attr,
293 &dev_attr_unit_remove.attr, 278 &dev_attr_unit_remove.attr,
294 &dev_attr_port_failed.attr, 279 &dev_attr_port_failed.attr,
@@ -302,7 +287,7 @@ static struct attribute *zfcp_port_no_ns_attrs[] = {
302 * zfcp_sysfs_port_attrs - sysfs attributes for all other ports 287 * zfcp_sysfs_port_attrs - sysfs attributes for all other ports
303 */ 288 */
304struct attribute_group zfcp_sysfs_port_attrs = { 289struct attribute_group zfcp_sysfs_port_attrs = {
305 .attrs = zfcp_port_no_ns_attrs, 290 .attrs = zfcp_port_attrs,
306}; 291};
307 292
308static struct attribute *zfcp_unit_attrs[] = { 293static struct attribute *zfcp_unit_attrs[] = {