From: Christopher J. Morrone Date: Wed, 30 Mar 2016 01:26:00 +0000 (-0400) Subject: LU-5725 ofd: Expose OFD site_stats through proc X-Git-Tag: 2.8.53~48 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F19247%2F4;p=fs%2Flustre-release.git LU-5725 ofd: Expose OFD site_stats through proc While exposed for the MDT the lu_object cache site stats are not available for the OFD. This small patch makes those same stats available under /proc/fs/lustre/obdfilter/lustre-OST0001/site_stats. Change-Id: Ic5207d5471cd0f8eacc5a3363c12975c8880224d Signed-off-by: Christopher J. Morrone Reviewed-on: http://review.whamcloud.com/19247 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Emoly Liu Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/ofd/lproc_ofd.c b/lustre/ofd/lproc_ofd.c index 0ad50d4..05d1deb 100644 --- a/lustre/ofd/lproc_ofd.c +++ b/lustre/ofd/lproc_ofd.c @@ -839,6 +839,14 @@ ofd_lfsck_verify_pfid_seq_write(struct file *file, const char __user *buffer, } LPROC_SEQ_FOPS(ofd_lfsck_verify_pfid); +static int ofd_site_stats_seq_show(struct seq_file *m, void *data) +{ + struct obd_device *obd = m->private; + + return lu_site_stats_seq_print(obd->obd_lu_dev->ld_site, m); +} +LPROC_SEQ_FOPS_RO(ofd_site_stats); + LPROC_SEQ_FOPS_RO_TYPE(ofd, uuid); LPROC_SEQ_FOPS_RO_TYPE(ofd, blksize); LPROC_SEQ_FOPS_RO_TYPE(ofd, kbytestotal); @@ -923,6 +931,8 @@ struct lprocfs_vars lprocfs_ofd_obd_vars[] = { .fops = &ofd_lfsck_layout_fops }, { .name = "lfsck_verify_pfid", .fops = &ofd_lfsck_verify_pfid_fops }, + { .name = "site_stats", + .fops = &ofd_site_stats_fops }, { NULL } };