diff options
author | Stefan Raspl <raspl@linux.vnet.ibm.com> | 2008-10-01 06:42:14 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-10-03 13:11:52 -0400 |
commit | 2450d3e7b8604d0abb042817f2502cb7ee0b782f (patch) | |
tree | b7f319f299fd0ec62e9d6840158c070d9bce0df7 /drivers/s390/scsi/zfcp_sysfs.c | |
parent | 7ae628d9d21a088b4a2d26a9d39c29c0acd2d03b (diff) |
[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", | |||
487 | ZFCP_SHOST_ATTR(seconds_active, "%llu\n", | 487 | ZFCP_SHOST_ATTR(seconds_active, "%llu\n", |
488 | (unsigned long long) stat_info.seconds_act); | 488 | (unsigned long long) stat_info.seconds_act); |
489 | 489 | ||
490 | static ssize_t zfcp_sysfs_adapter_q_full_show(struct device *dev, | ||
491 | struct device_attribute *attr, | ||
492 | char *buf) | ||
493 | { | ||
494 | struct Scsi_Host *scsi_host = class_to_shost(dev); | ||
495 | struct zfcp_adapter *adapter = | ||
496 | (struct zfcp_adapter *) scsi_host->hostdata[0]; | ||
497 | |||
498 | return sprintf(buf, "%d\n", atomic_read(&adapter->qdio_outb_full)); | ||
499 | } | ||
500 | static DEVICE_ATTR(queue_full, S_IRUGO, zfcp_sysfs_adapter_q_full_show, NULL); | ||
501 | |||
490 | struct device_attribute *zfcp_sysfs_shost_attrs[] = { | 502 | struct device_attribute *zfcp_sysfs_shost_attrs[] = { |
491 | &dev_attr_utilization, | 503 | &dev_attr_utilization, |
492 | &dev_attr_requests, | 504 | &dev_attr_requests, |
493 | &dev_attr_megabytes, | 505 | &dev_attr_megabytes, |
494 | &dev_attr_seconds_active, | 506 | &dev_attr_seconds_active, |
507 | &dev_attr_queue_full, | ||
495 | NULL | 508 | NULL |
496 | }; | 509 | }; |