-struct lprocfs_vars lprocfs_lod_obd_vars[] = {
- { "uuid", lprocfs_rd_uuid, 0, 0 },
- { "stripesize", lod_rd_stripesize, lod_wr_stripesize, 0 },
- { "stripeoffset", lod_rd_stripeoffset, lod_wr_stripeoffset, 0 },
- { "stripecount", lod_rd_stripecount, lod_wr_stripecount, 0 },
- { "stripetype", lod_rd_stripetype, lod_wr_stripetype, 0 },
- { "numobd", lod_rd_numobd, 0, 0 },
- { "activeobd", lod_rd_activeobd, 0, 0 },
- { "filestotal", lprocfs_rd_filestotal, 0, 0 },
- { "filesfree", lprocfs_rd_filesfree, 0, 0 },
- /*{ "filegroups", lprocfs_rd_filegroups, 0, 0 },*/
- { "blocksize", lprocfs_rd_blksize, 0, 0 },
- { "kbytestotal", lprocfs_rd_kbytestotal, 0, 0 },
- { "kbytesfree", lprocfs_rd_kbytesfree, 0, 0 },
- { "kbytesavail", lprocfs_rd_kbytesavail, 0, 0 },
- { "desc_uuid", lod_rd_desc_uuid, 0, 0 },
- { "qos_prio_free",lod_rd_qos_priofree, lod_wr_qos_priofree, 0 },
- { "qos_threshold_rr", lod_rd_qos_thresholdrr, lod_wr_qos_thresholdrr, 0 },
- { "qos_maxage", lod_rd_qos_maxage, lod_wr_qos_maxage, 0 },
+LPROC_SEQ_FOPS_RO_TYPE(lod, uuid);
+
+LPROC_SEQ_FOPS_RO_TYPE(lod, dt_blksize);
+LPROC_SEQ_FOPS_RO_TYPE(lod, dt_kbytestotal);
+LPROC_SEQ_FOPS_RO_TYPE(lod, dt_kbytesfree);
+LPROC_SEQ_FOPS_RO_TYPE(lod, dt_kbytesavail);
+LPROC_SEQ_FOPS_RO_TYPE(lod, dt_filestotal);
+LPROC_SEQ_FOPS_RO_TYPE(lod, dt_filesfree);
+
+static int lod_lmv_failout_seq_show(struct seq_file *m, void *v)
+{
+ struct obd_device *dev = m->private;
+ struct lod_device *lod;
+
+ LASSERT(dev != NULL);
+ lod = lu2lod_dev(dev->obd_lu_dev);
+
+ return seq_printf(m, "%d\n", lod->lod_lmv_failout ? 1 : 0);
+}
+
+static ssize_t
+lod_lmv_failout_seq_write(struct file *file, const char *buffer,
+ size_t count, loff_t *off)
+{
+ struct seq_file *m = file->private_data;
+ struct obd_device *dev = m->private;
+ struct lod_device *lod;
+ int val = 0;
+ int rc;
+
+ LASSERT(dev != NULL);
+ lod = lu2lod_dev(dev->obd_lu_dev);
+
+ rc = lprocfs_write_helper(buffer, count, &val);
+ if (rc != 0)
+ return rc;
+
+ if (val != 0)
+ lod->lod_lmv_failout = 1;
+ else
+ lod->lod_lmv_failout = 0;
+
+ return count;
+}
+LPROC_SEQ_FOPS(lod_lmv_failout);
+
+static struct lprocfs_seq_vars lprocfs_lod_obd_vars[] = {
+ { .name = "uuid",
+ .fops = &lod_uuid_fops },
+ { .name = "stripesize",
+ .fops = &lod_stripesize_fops },
+ { .name = "stripeoffset",
+ .fops = &lod_stripeoffset_fops },
+ { .name = "stripecount",
+ .fops = &lod_stripecount_fops },
+ { .name = "stripetype",
+ .fops = &lod_stripetype_fops },
+ { .name = "numobd",
+ .fops = &lod_numobd_fops },
+ { .name = "activeobd",
+ .fops = &lod_activeobd_fops },
+ { .name = "desc_uuid",
+ .fops = &lod_desc_uuid_fops },
+ { .name = "qos_prio_free",
+ .fops = &lod_qos_priofree_fops },
+ { .name = "qos_threshold_rr",
+ .fops = &lod_qos_thresholdrr_fops },
+ { .name = "qos_maxage",
+ .fops = &lod_qos_maxage_fops },
+ { .name = "lmv_failout",
+ .fops = &lod_lmv_failout_fops },