Whamcloud - gitweb
- landed b_hd_cray_merge3
[fs/lustre-release.git] / lustre / mds / lproc_mds.c
index 085c840..289b9ad 100644 (file)
@@ -96,6 +96,17 @@ static int lprocfs_mds_wr_config_update(struct file *file, const char *buffer,
         RETURN(mds_dt_update_config(obd, 0));
 }
 
+static int lprocfs_rd_filesopen(char *page, char **start, off_t off,
+                                int count, int *eof, void *data)
+{
+        struct obd_device *obd = data;
+        LASSERT(obd != NULL);
+        *eof = 1;
+
+        return snprintf(page, count, "%d\n",
+                        atomic_read(&obd->u.mds.mds_open_count));
+}
+
 static int lprocfs_rd_last_fid(char *page, char **start, off_t off,
                                int count, int *eof, void *data)
 {
@@ -131,6 +142,7 @@ struct lprocfs_vars lprocfs_mds_obd_vars[] = {
         { "fstype",       lprocfs_rd_fstype,      0, 0 },
         { "filestotal",   lprocfs_rd_filestotal,  0, 0 },
         { "filesfree",    lprocfs_rd_filesfree,   0, 0 },
+        { "filesopen",    lprocfs_rd_filesopen,   0, 0 },
         { "mntdev",       lprocfs_mds_rd_mntdev,  0, 0 },
         { "last_fid",     lprocfs_rd_last_fid,    0, 0 },
         { "group",        lprocfs_rd_group,       0, 0 },