return count;
}
+int lprocfs_filter_rd_capa_stat(char *page, char **start, off_t off, int count,
+ int *eof, void *data)
+{
+ struct obd_device *obd = data;
+ int rc;
+
+ rc = snprintf(page, count, "%d\n",
+ obd->u.filter.fo_capa_stat);
+ return rc;
+}
+
+int lprocfs_filter_wr_capa_stat(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct obd_device *obd = data;
+ int val;
+ int rc;
+
+ rc = lprocfs_write_helper(buffer, count, &val);
+ if (rc)
+ return rc;
+
+ obd->u.filter.fo_capa_stat = val;
+ return count;
+}
+
+static
+int lprocfs_filter_rd_blacklist(char *page, char **start, off_t off, int count,
+ int *eof, void *data)
+{
+ int rc;
+
+ rc = blacklist_display(page, count);
+ *eof = 1;
+ return rc;
+}
+
+static
+int lprocfs_filter_wr_blacklist(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ int add;
+ uid_t uid = -1;
+
+ if (count < 2)
+ return count;
+ if (buffer[0] == '+')
+ add = 1;
+ else if (buffer[0] == '-')
+ add = 0;
+ else
+ return count;
+
+ sscanf(buffer + 1, "%u", &uid);
+ if (add)
+ blacklist_add(uid);
+ else
+ blacklist_del(uid);
+ return count;
+}
+
static struct lprocfs_vars lprocfs_obd_vars[] = {
{ "uuid", lprocfs_rd_uuid, 0, 0 },
{ "blocksize", lprocfs_rd_blksize, 0, 0 },
{ "readcache_max_filesize",
lprocfs_filter_rd_readcache,
lprocfs_filter_wr_readcache, 0 },
+ { "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 },
+ { "capa", lprocfs_filter_rd_capa_stat,
+ lprocfs_filter_wr_capa_stat, 0 },
+ { "blacklist", lprocfs_filter_rd_blacklist,
+ lprocfs_filter_wr_blacklist, 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");