Whamcloud - gitweb
merge b_devel into HEAD (20030703)
[fs/lustre-release.git] / lustre / llite / lproc_llite.c
index 14eac3f..42fea4b 100644 (file)
@@ -28,6 +28,8 @@
 #include <linux/lustre_lite.h>
 #include <linux/lprocfs_status.h>
 
+#include "llite_internal.h"
+
 /* /proc/lustre/llite mount point registration */
 
 #ifndef LPROCFS
@@ -97,6 +99,8 @@ struct lprocfs_vars lprocfs_obd_vars[] = {
         { "filestotal",  rd_filestotal,  0, 0 },
         { "filesfree",   rd_filesfree,   0, 0 },
         { "filegroups",  rd_filegroups,  0, 0 },
+        { "dirty_pages", ll_rd_dirty_pages, 0, 0},
+        { "max_dirty_pages", ll_rd_max_dirty_pages, ll_wr_max_dirty_pages, 0},
         { 0 }
 };
 
@@ -108,8 +112,6 @@ struct llite_file_opcode {
         const char *opname;
 } llite_opcode_table[LPROC_LL_FILE_OPCODES] = {
         /* file operation */
-        { LPROC_LL_DIRTY_PAGES,    LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
-                                   "dirty_pages" },
         { LPROC_LL_DIRTY_HITS,     LPROCFS_TYPE_REGS, "dirty_pages_hits" },
         { LPROC_LL_DIRTY_MISSES,   LPROCFS_TYPE_REGS, "dirty_pages_misses" },
         { LPROC_LL_WB_WRITEPAGE,   LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
@@ -161,7 +163,6 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
         struct ll_sb_info *sbi = ll_s2sbi(sb);
         struct obd_device *obd;
         char name[MAX_STRING_SIZE + 1];
-        struct obd_uuid uuid;
         int err, id;
         struct lprocfs_stats *svc_stats = NULL;
         ENTRY;
@@ -222,8 +223,7 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
                 goto out;
 
         /* MDC info */
-        strncpy(uuid.uuid, mdc, sizeof(uuid.uuid));
-        obd = class_uuid2obd(&uuid);
+        obd = class_name2obd(mdc);
 
         LASSERT(obd != NULL);
         LASSERT(obd->obd_type != NULL);
@@ -243,8 +243,7 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
                 goto out;
 
         /* OSC */
-        strncpy(uuid.uuid, osc, sizeof(uuid.uuid));
-        obd = class_uuid2obd(&uuid);
+        obd = class_name2obd(osc);
 
         LASSERT(obd != NULL);
         LASSERT(obd->obd_type != NULL);