return snprintf(page, count, "%u\n", obd->u.filter.fo_mds_ost_sync);
}
+int lprocfs_filter_rd_degraded(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ struct obd_device *obd = data;
+
+ return snprintf(page, count, "%u\n", obd->u.filter.fo_raid_degraded);
+}
+
+int lprocfs_filter_wr_degraded(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct obd_device *obd = data;
+ int val, rc;
+
+ rc = lprocfs_write_helper(buffer, count, &val);
+ if (rc)
+ return rc;
+
+ spin_lock(&obd->obd_osfs_lock);
+ obd->u.filter.fo_raid_degraded = !!val;
+ spin_unlock(&obd->obd_osfs_lock);
+ return count;
+}
+
static struct lprocfs_vars lprocfs_filter_obd_vars[] = {
{ "uuid", lprocfs_rd_uuid, 0, 0 },
{ "blocksize", lprocfs_rd_blksize, 0, 0 },
{ "writethrough_cache_enable", lprocfs_filter_rd_wcache,
lprocfs_filter_wr_wcache, 0},
{ "mds_sync", lprocfs_filter_rd_mds_sync, 0, 0},
+ { "degraded", lprocfs_filter_rd_degraded,
+ lprocfs_filter_wr_degraded, 0 },
{ 0 }
};