Whamcloud - gitweb
Branch: b_new_cmd
authorwangdi <wangdi>
Thu, 28 Sep 2006 10:06:12 +0000 (10:06 +0000)
committerwangdi <wangdi>
Thu, 28 Sep 2006 10:06:12 +0000 (10:06 +0000)
merge group filter lproc fixes from HEAD

lustre/obdfilter/lproc_obdfilter.c

index 37ae2e9..d2e5391 100644 (file)
@@ -87,12 +87,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 = FILTER_GROUP_MDS0; 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,