Whamcloud - gitweb
LU-5725 ofd: Expose OFD site_stats through proc 47/19247/4
authorChristopher J. Morrone <morrone2@llnl.gov>
Wed, 30 Mar 2016 01:26:00 +0000 (21:26 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Apr 2016 15:48:20 +0000 (15:48 +0000)
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 <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/19247
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ofd/lproc_ofd.c

index 0ad50d4..05d1deb 100644 (file)
@@ -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 }
 };