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,
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,
{ "readcache_max_filesize",
lprocfs_filter_rd_readcache,
lprocfs_filter_wr_readcache, 0 },
+ { "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 },
{ 0 }
};
/* 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");