Whamcloud - gitweb
smash the HEAD with the contents of b_cmd. HEAD_PRE_CMD_SMASH and
[fs/lustre-release.git] / lustre / obdfilter / lproc_obdfilter.c
index 51458c0..10fbc8c 100644 (file)
@@ -50,12 +50,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,
@@ -89,6 +100,7 @@ static struct lprocfs_vars lprocfs_obd_vars[] = {
         { "blocksize",    lprocfs_rd_blksize,       0, 0 },
         { "kbytestotal",  lprocfs_rd_kbytestotal,   0, 0 },
         { "kbytesfree",   lprocfs_rd_kbytesfree,    0, 0 },
+        { "kbytesavail",  lprocfs_rd_kbytesavail,   0, 0 },
         { "filestotal",   lprocfs_rd_filestotal,    0, 0 },
         { "filesfree",    lprocfs_rd_filesfree,     0, 0 },
         //{ "filegroups",   lprocfs_rd_filegroups,    0, 0 },