-static struct lprocfs_vars lprocfs_osp_obd_vars[] = {
- { "uuid", lprocfs_rd_uuid, 0, 0 },
- { "ping", 0, lprocfs_wr_ping, 0, 0, 0222 },
- { "connect_flags", lprocfs_rd_connect_flags, 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 },
- { "filestotal", lprocfs_rd_filestotal, 0, 0 },
- { "filesfree", lprocfs_rd_filesfree, 0, 0 },
- { "ost_server_uuid", lprocfs_rd_server_uuid, 0, 0 },
- { "ost_conn_uuid", lprocfs_rd_conn_uuid, 0, 0 },
- { "active", osp_rd_active, osp_wr_active, 0 },
- { "max_rpcs_in_flight", osp_rd_max_rpcs_in_flight,
- osp_wr_max_rpcs_in_flight, 0 },
- { "max_rpcs_in_progress", osp_rd_max_rpcs_in_prog,
- osp_wr_max_rpcs_in_prog, 0 },
- { "create_count", osp_rd_create_count,
- osp_wr_create_count, 0 },
- { "max_create_count", osp_rd_max_create_count,
- osp_wr_max_create_count, 0 },
- { "prealloc_next_id", osp_rd_prealloc_next_id, 0, 0 },
- { "prealloc_last_id", osp_rd_prealloc_last_id, 0, 0 },
- { "prealloc_reserved", osp_rd_prealloc_reserved, 0, 0 },
- { "timeouts", lprocfs_rd_timeouts, 0, 0 },
- { "import", lprocfs_rd_import, lprocfs_wr_import, 0 },
- { "state", lprocfs_rd_state, 0, 0 },
- { "maxage", osp_rd_maxage, osp_wr_maxage, 0 },
- { "prealloc_status", osp_rd_pre_status, 0, 0 },
- { "sync_changes", osp_rd_syn_changes, 0, 0 },
- { "sync_in_flight", osp_rd_syn_in_flight, 0, 0 },
- { "sync_in_progress", osp_rd_syn_in_prog, 0, 0 },
- { "old_sync_processed", osp_rd_old_sync_processed, 0, 0 },
+static int
+osp_lfsck_max_rpcs_in_flight_seq_show(struct seq_file *m, void *data)
+{
+ struct obd_device *dev = m->private;
+ __u32 max;
+
+ max = obd_get_max_rpcs_in_flight(&dev->u.cli);
+ return seq_printf(m, "%u\n", max);
+}
+
+static ssize_t
+osp_lfsck_max_rpcs_in_flight_seq_write(struct file *file,
+ const char __user *buffer,
+ size_t count, loff_t *off)
+{
+ struct seq_file *m = file->private_data;
+ struct obd_device *dev = m->private;
+ int val;
+ int rc;
+
+ rc = lprocfs_write_helper(buffer, count, &val);
+ if (rc == 0)
+ rc = obd_set_max_rpcs_in_flight(&dev->u.cli, val);
+
+ if (rc != 0)
+ count = rc;
+
+ return count;
+}
+LPROC_SEQ_FOPS(osp_lfsck_max_rpcs_in_flight);
+
+LPROC_SEQ_FOPS_WO_TYPE(osp, ping);
+LPROC_SEQ_FOPS_RO_TYPE(osp, uuid);
+LPROC_SEQ_FOPS_RO_TYPE(osp, connect_flags);
+LPROC_SEQ_FOPS_RO_TYPE(osp, server_uuid);
+LPROC_SEQ_FOPS_RO_TYPE(osp, conn_uuid);
+
+static int osp_max_pages_per_rpc_seq_show(struct seq_file *m, void *v)
+{
+ return lprocfs_obd_max_pages_per_rpc_seq_show(m, m->private);
+}
+LPROC_SEQ_FOPS_RO(osp_max_pages_per_rpc);
+LPROC_SEQ_FOPS_RO_TYPE(osp, timeouts);
+
+LPROC_SEQ_FOPS_RW_TYPE(osp, import);
+LPROC_SEQ_FOPS_RO_TYPE(osp, state);
+
+static struct lprocfs_seq_vars lprocfs_osp_obd_vars[] = {
+ { .name = "uuid",
+ .fops = &osp_uuid_fops },
+ { .name = "ping",
+ .fops = &osp_ping_fops,
+ .proc_mode = 0222 },
+ { .name = "connect_flags",
+ .fops = &osp_connect_flags_fops },
+ { .name = "ost_server_uuid",
+ .fops = &osp_server_uuid_fops },
+ { .name = "ost_conn_uuid",
+ .fops = &osp_conn_uuid_fops },
+ { .name = "active",
+ .fops = &osp_active_fops },
+ { .name = "max_rpcs_in_flight",
+ .fops = &osp_max_rpcs_in_flight_fops },
+ { .name = "max_rpcs_in_progress",
+ .fops = &osp_max_rpcs_in_prog_fops },
+ { .name = "create_count",
+ .fops = &osp_create_count_fops },
+ { .name = "max_create_count",
+ .fops = &osp_max_create_count_fops },
+ { .name = "prealloc_next_id",
+ .fops = &osp_prealloc_next_id_fops },
+ { .name = "prealloc_next_seq",
+ .fops = &osp_prealloc_next_seq_fops },
+ { .name = "prealloc_last_id",
+ .fops = &osp_prealloc_last_id_fops },
+ { .name = "prealloc_last_seq",
+ .fops = &osp_prealloc_last_seq_fops },
+ { .name = "prealloc_reserved",
+ .fops = &osp_prealloc_reserved_fops },
+ { .name = "timeouts",
+ .fops = &osp_timeouts_fops },
+ { .name = "import",
+ .fops = &osp_import_fops },
+ { .name = "state",
+ .fops = &osp_state_fops },
+ { .name = "maxage",
+ .fops = &osp_maxage_fops },
+ { .name = "prealloc_status",
+ .fops = &osp_pre_status_fops },
+ { .name = "sync_changes",
+ .fops = &osp_syn_changes_fops },
+ { .name = "sync_in_flight",
+ .fops = &osp_syn_in_flight_fops },
+ { .name = "sync_in_progress",
+ .fops = &osp_syn_in_prog_fops },
+ { .name = "old_sync_processed",
+ .fops = &osp_old_sync_processed_fops },