From 5ab944f97e09a3d52951fe903eed9a7b88d810b2 Mon Sep 17 00:00:00 2001 From: Swen Schillig Date: Wed, 1 Oct 2008 12:42:17 +0200 Subject: [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 Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley --- drivers/s390/scsi/zfcp_sysfs.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'drivers/s390/scsi/zfcp_sysfs.c') diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c index 7e857571fe4..430e486e918 100644 --- a/drivers/s390/scsi/zfcp_sysfs.c +++ b/drivers/s390/scsi/zfcp_sysfs.c @@ -273,22 +273,7 @@ out: } static DEVICE_ATTR(unit_remove, S_IWUSR, NULL, zfcp_sysfs_unit_remove_store); -static struct attribute *zfcp_port_ns_attrs[] = { - &dev_attr_port_failed.attr, - &dev_attr_port_in_recovery.attr, - &dev_attr_port_status.attr, - &dev_attr_port_access_denied.attr, - NULL -}; - -/** - * zfcp_sysfs_ns_port_attrs - sysfs attributes for nameserver - */ -struct attribute_group zfcp_sysfs_ns_port_attrs = { - .attrs = zfcp_port_ns_attrs, -}; - -static struct attribute *zfcp_port_no_ns_attrs[] = { +static struct attribute *zfcp_port_attrs[] = { &dev_attr_unit_add.attr, &dev_attr_unit_remove.attr, &dev_attr_port_failed.attr, @@ -302,7 +287,7 @@ static struct attribute *zfcp_port_no_ns_attrs[] = { * zfcp_sysfs_port_attrs - sysfs attributes for all other ports */ struct attribute_group zfcp_sysfs_port_attrs = { - .attrs = zfcp_port_no_ns_attrs, + .attrs = zfcp_port_attrs, }; static struct attribute *zfcp_unit_attrs[] = { -- cgit v1.2.3