A previous patch which moved some attrs from /proc to /sys
inadvertently removed 'cur_dirty_grant_bytes'.
This patch restores it in /sys.
Test-Parameters: trivial
Fixes:
32fb31f3bf3d ("LU-8066 osc: move suitable values from procfs to sysfs")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ic6cff067d3634d1b1406dad4eb156ad1967042c9
Reviewed-on: https://review.whamcloud.com/39740
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
}
LUSTRE_RO_ATTR(cur_lost_grant_bytes);
}
LUSTRE_RO_ATTR(cur_lost_grant_bytes);
+static ssize_t cur_dirty_grant_bytes_show(struct kobject *kobj,
+ struct attribute *attr,
+ char *buf)
+{
+ struct obd_device *obd = container_of(kobj, struct obd_device,
+ obd_kset.kobj);
+ struct client_obd *cli = &obd->u.cli;
+
+ return scnprintf(buf, PAGE_SIZE, "%lu\n", cli->cl_dirty_grant);
+}
+LUSTRE_RO_ATTR(cur_dirty_grant_bytes);
+
static ssize_t grant_shrink_interval_show(struct kobject *kobj,
struct attribute *attr,
char *buf)
static ssize_t grant_shrink_interval_show(struct kobject *kobj,
struct attribute *attr,
char *buf)
&lustre_attr_contention_seconds.attr,
&lustre_attr_cur_dirty_bytes.attr,
&lustre_attr_cur_lost_grant_bytes.attr,
&lustre_attr_contention_seconds.attr,
&lustre_attr_cur_dirty_bytes.attr,
&lustre_attr_cur_lost_grant_bytes.attr,
+ &lustre_attr_cur_dirty_grant_bytes.attr,
&lustre_attr_destroys_in_flight.attr,
&lustre_attr_grant_shrink_interval.attr,
&lustre_attr_lockless_truncate.attr,
&lustre_attr_destroys_in_flight.attr,
&lustre_attr_grant_shrink_interval.attr,
&lustre_attr_lockless_truncate.attr,