aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_diag.h
diff options
context:
space:
mode:
authorBenjamin Block <bblock@linux.ibm.com>2019-10-25 18:12:51 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2019-10-28 22:16:15 -0400
commit48910f8c35cfd250d806f3e03150d256f40b6d4c (patch)
tree33409f703b79a34d361e16fd2adf5384b5a1fae5 /drivers/s390/scsi/zfcp_diag.h
parentscsi: zfcp: implicitly refresh config-data diagnostics when reading sysfs (diff)
downloadlinux-dev-48910f8c35cfd250d806f3e03150d256f40b6d4c.tar.xz
linux-dev-48910f8c35cfd250d806f3e03150d256f40b6d4c.zip
scsi: zfcp: move maximum age of diagnostic buffers into a per-adapter variable
Replace the static define (ZFCP_DIAG_MAX_AGE) with a per-adapter variable (${adapter}->diagnostics->max_age). This new variable is exported via sysfs, along with other, already existing adapter variables, and can both be read and written. This way users can choose how much time should pass between refreshes of diagnostic buffers. The default value for the age remains to be five seconds. By setting this new variable to 0, the caching of diagnostic buffers for userspace accesses can also be completely removed. All diagnostic buffers of a given adapter are subject to this setting in the same way. Link: https://lore.kernel.org/r/b1d0977cc884b16dd4ca6418e4320c56a4c31d63.1572018132.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier <maier@linux.ibm.com> Signed-off-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_diag.h')
-rw-r--r--drivers/s390/scsi/zfcp_diag.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_diag.h b/drivers/s390/scsi/zfcp_diag.h
index cf2947cd8c8f..b9c93d15f67c 100644
--- a/drivers/s390/scsi/zfcp_diag.h
+++ b/drivers/s390/scsi/zfcp_diag.h
@@ -42,6 +42,8 @@ struct zfcp_diag_header {
* adapter.
* @sysfs_established: flag showing that the associated sysfs-group was created
* during run of zfcp_adapter_enqueue().
+ * @max_age: maximum age of data in diagnostic buffers before they need to be
+ * refreshed (in ms).
* @port_data: data retrieved using exchange port data.
* @port_data.header: header with metadata for the cache in @port_data.data.
* @port_data.data: cached QTCB Bottom of command exchange port data.
@@ -52,6 +54,8 @@ struct zfcp_diag_header {
struct zfcp_diag_adapter {
u64 sysfs_established :1;
+ unsigned long max_age;
+
struct {
struct zfcp_diag_header header;
struct fsf_qtcb_bottom_port data;