diff options
author | Stefan Raspl <raspl@linux.vnet.ibm.com> | 2008-10-01 12:42:14 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-10-03 19:11:52 +0200 |
commit | 2450d3e7b8604d0abb042817f2502cb7ee0b782f (patch) | |
tree | b7f319f299fd0ec62e9d6840158c070d9bce0df7 /drivers/s390/scsi/zfcp_sysfs.c | |
parent | [SCSI] scsi_dh: suppress comparison warning (diff) | |
download | linux-2450d3e7b8604d0abb042817f2502cb7ee0b782f.tar.xz linux-2450d3e7b8604d0abb042817f2502cb7ee0b782f.zip |
[SCSI] zfcp: add queue_full sysfs attribute
Adds a new sysfs attribute queue_full for adapters that records the number
of incidents where a requests could not be submitted due to insufficient
free space on the request queue.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.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.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c index 2e85c6c49e7d..7e857571fe44 100644 --- a/drivers/s390/scsi/zfcp_sysfs.c +++ b/drivers/s390/scsi/zfcp_sysfs.c @@ -487,10 +487,23 @@ ZFCP_SHOST_ATTR(megabytes, "%llu %llu\n", ZFCP_SHOST_ATTR(seconds_active, "%llu\n", (unsigned long long) stat_info.seconds_act); +static ssize_t zfcp_sysfs_adapter_q_full_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct Scsi_Host *scsi_host = class_to_shost(dev); + struct zfcp_adapter *adapter = + (struct zfcp_adapter *) scsi_host->hostdata[0]; + + return sprintf(buf, "%d\n", atomic_read(&adapter->qdio_outb_full)); +} +static DEVICE_ATTR(queue_full, S_IRUGO, zfcp_sysfs_adapter_q_full_show, NULL); + struct device_attribute *zfcp_sysfs_shost_attrs[] = { &dev_attr_utilization, &dev_attr_requests, &dev_attr_megabytes, &dev_attr_seconds_active, + &dev_attr_queue_full, NULL }; |