Whamcloud - gitweb
b=7049
[fs/lustre-release.git] / lustre / obdfilter / lproc_obdfilter.c
index 8f64926..ef632a9 100644 (file)
@@ -37,8 +37,10 @@ static struct lprocfs_vars lprocfs_module_vars[] = { {0} };
 static int lprocfs_filter_rd_groups(char *page, char **start, off_t off,
                                     int count, int *eof, void *data)
 {
+        struct obd_device *obd = (struct obd_device *)data;
+        
         *eof = 1;
-        return snprintf(page, count, "%u\n", FILTER_GROUPS);
+        return snprintf(page, count, "%u\n", obd->u.filter.fo_group_count);
 }
 
 static int lprocfs_filter_rd_tot_dirty(char *page, char **start, off_t off,
@@ -87,12 +89,23 @@ static int lprocfs_filter_rd_last_id(char *page, char **start, off_t off,
                                      int count, int *eof, void *data)
 {
         struct obd_device *obd = data;
+        struct filter_obd *filter = &obd->u.filter;
+        int retval = 0, rc, i;
 
         if (obd == NULL)
                 return 0;
 
-        return snprintf(page, count, LPU64"\n",
-                        filter_last_id(&obd->u.filter, 0));
+        for (i = 1; i < filter->fo_group_count; i++) {
+                rc = snprintf(page, count, LPU64"\n",filter_last_id(filter, i));
+                if (rc < 0) {
+                        retval = rc;
+                        break;
+                }
+                page += rc;
+                count -= rc;
+                retval += rc;
+        }
+        return retval;
 }
 
 int lprocfs_filter_rd_readcache(char *page, char **start, off_t off, int count,
@@ -140,6 +153,7 @@ static struct lprocfs_vars lprocfs_obd_vars[] = {
         { "readcache_max_filesize",
                           lprocfs_filter_rd_readcache,
                           lprocfs_filter_wr_readcache, 0 },
+        { "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 },
         { 0 }
 };
 
@@ -226,7 +240,7 @@ static int filter_brw_stats_seq_show(struct seq_file *seq, void *v)
 
         /* this sampling races with updates */
 
-        seq_printf(seq, "snapshot_time:         %lu:%lu (secs:usecs)\n",
+        seq_printf(seq, "snapshot_time:         %lu.%lu (secs.usecs)\n",
                    now.tv_sec, now.tv_usec);
 
         seq_printf(seq, "\n\t\t\tread\t\t\twrite\n");