LPROC_SEQ_FOPS_RO(lprocfs_server_fid_server);
struct lprocfs_seq_vars seq_server_proc_list[] = {
- { "space", &lprocfs_server_fid_space_fops },
- { "width", &lprocfs_server_fid_width_fops },
- { "server", &lprocfs_server_fid_server_fops },
+ { .name = "space",
+ .fops = &lprocfs_server_fid_space_fops },
+ { .name = "width",
+ .fops = &lprocfs_server_fid_width_fops },
+ { .name = "server",
+ .fops = &lprocfs_server_fid_server_fops },
{ NULL }
};
LPROC_SEQ_FOPS_RO(lprocfs_client_fid_fid);
struct lprocfs_seq_vars seq_client_proc_list[] = {
- { "space", &lprocfs_client_fid_space_fops },
- { "width", &lprocfs_client_fid_width_fops },
- { "server", &lprocfs_client_fid_server_fops },
- { "fid", &lprocfs_client_fid_fid_fops },
+ { .name = "space",
+ .fops = &lprocfs_client_fid_space_fops },
+ { .name = "width",
+ .fops = &lprocfs_client_fid_width_fops },
+ { .name = "server",
+ .fops = &lprocfs_client_fid_server_fops },
+ { .name = "fid",
+ .fops = &lprocfs_client_fid_fid_fops },
{ NULL }
};
#endif
LPROC_SEQ_FOPS_RO_TYPE(lmv, uuid);
struct lprocfs_seq_vars lprocfs_lmv_obd_vars[] = {
- { "numobd", &lmv_numobd_fops },
- { "placement", &lmv_placement_fops },
- { "activeobd", &lmv_activeobd_fops },
- { "uuid", &lmv_uuid_fops },
- { "desc_uuid", &lmv_desc_uuid_fops },
+ { .name = "numobd",
+ .fops = &lmv_numobd_fops },
+ { .name = "placement",
+ .fops = &lmv_placement_fops },
+ { .name = "activeobd",
+ .fops = &lmv_activeobd_fops },
+ { .name = "uuid",
+ .fops = &lmv_uuid_fops },
+ { .name = "desc_uuid",
+ .fops = &lmv_desc_uuid_fops },
{ 0 }
};
LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesavail);
struct lprocfs_seq_vars lprocfs_lov_obd_vars[] = {
- { "uuid", &lov_uuid_fops },
- { "stripesize", &lov_stripesize_fops },
- { "stripeoffset", &lov_stripeoffset_fops },
- { "stripecount", &lov_stripecount_fops },
- { "stripetype", &lov_stripetype_fops },
- { "numobd", &lov_numobd_fops },
- { "activeobd", &lov_activeobd_fops },
- { "filestotal", &lov_filestotal_fops },
- { "filesfree", &lov_filesfree_fops },
- { "blocksize", &lov_blksize_fops },
- { "kbytestotal", &lov_kbytestotal_fops },
- { "kbytesfree", &lov_kbytesfree_fops },
- { "kbytesavail", &lov_kbytesavail_fops },
- { "desc_uuid", &lov_desc_uuid_fops },
+ { .name = "uuid",
+ .fops = &lov_uuid_fops },
+ { .name = "stripesize",
+ .fops = &lov_stripesize_fops },
+ { .name = "stripeoffset",
+ .fops = &lov_stripeoffset_fops },
+ { .name = "stripecount",
+ .fops = &lov_stripecount_fops },
+ { .name = "stripetype",
+ .fops = &lov_stripetype_fops },
+ { .name = "numobd",
+ .fops = &lov_numobd_fops },
+ { .name = "activeobd",
+ .fops = &lov_activeobd_fops },
+ { .name = "filestotal",
+ .fops = &lov_filestotal_fops },
+ { .name = "filesfree",
+ .fops = &lov_filesfree_fops },
+ { .name = "blocksize",
+ .fops = &lov_blksize_fops },
+ { .name = "kbytestotal",
+ .fops = &lov_kbytestotal_fops },
+ { .name = "kbytesfree",
+ .fops = &lov_kbytesfree_fops },
+ { .name = "kbytesavail",
+ .fops = &lov_kbytesavail_fops },
+ { .name = "desc_uuid",
+ .fops = &lov_desc_uuid_fops },
{ 0 }
};
LPROC_SEQ_FOPS_RW_TYPE(mdc, pinger_recov);
struct lprocfs_seq_vars lprocfs_mdc_obd_vars[] = {
- { "uuid", &mdc_uuid_fops, 0, 0 },
- { "ping", &mdc_ping_fops, 0, 0222 },
- { "connect_flags", &mdc_connect_flags_fops,0, 0 },
- { "blocksize", &mdc_blksize_fops, 0, 0 },
- { "kbytestotal", &mdc_kbytestotal_fops, 0, 0 },
- { "kbytesfree", &mdc_kbytesfree_fops, 0, 0 },
- { "kbytesavail", &mdc_kbytesavail_fops, 0, 0 },
- { "filestotal", &mdc_filestotal_fops, 0, 0 },
- { "filesfree", &mdc_filesfree_fops, 0, 0 },
- { "mds_server_uuid", &mdc_server_uuid_fops, 0, 0 },
- { "mds_conn_uuid", &mdc_conn_uuid_fops, 0, 0 },
+ { .name = "uuid",
+ .fops = &mdc_uuid_fops },
+ { .name = "ping",
+ .fops = &mdc_ping_fops,
+ .proc_mode = 0222 },
+ { .name = "connect_flags",
+ .fops = &mdc_connect_flags_fops },
+ { .name = "blocksize",
+ .fops = &mdc_blksize_fops },
+ { .name = "kbytestotal",
+ .fops = &mdc_kbytestotal_fops },
+ { .name = "kbytesfree",
+ .fops = &mdc_kbytesfree_fops },
+ { .name = "kbytesavail",
+ .fops = &mdc_kbytesavail_fops },
+ { .name = "filestotal",
+ .fops = &mdc_filestotal_fops },
+ { .name = "filesfree",
+ .fops = &mdc_filesfree_fops },
+ { .name = "mds_server_uuid",
+ .fops = &mdc_server_uuid_fops },
+ { .name = "mds_conn_uuid",
+ .fops = &mdc_conn_uuid_fops },
/*
* FIXME: below proc entry is provided, but not in used, instead
* sbi->sb_md_brw_size is used, the per obd variable should be used
* when CMD is enabled, and dir pages are managed in MDC layer.
* Remember to enable proc write function.
*/
- { "max_pages_per_rpc", &mdc_obd_max_pages_per_rpc_fops },
- { "max_rpcs_in_flight", &mdc_max_rpcs_in_flight_fops },
- { "timeouts", &mdc_timeouts_fops },
- { "import", &mdc_import_fops },
- { "state", &mdc_state_fops },
- { "pinger_recov", &mdc_pinger_recov_fops },
+ { .name = "max_pages_per_rpc",
+ .fops = &mdc_obd_max_pages_per_rpc_fops },
+ { .name = "max_rpcs_in_flight",
+ .fops = &mdc_max_rpcs_in_flight_fops },
+ { .name = "timeouts",
+ .fops = &mdc_timeouts_fops },
+ { .name = "import",
+ .fops = &mdc_import_fops },
+ { .name = "state",
+ .fops = &mdc_state_fops },
+ { .name = "pinger_recov",
+ .fops = &mdc_pinger_recov_fops },
{ 0 }
};
#endif /* LPROCFS */
LPROC_SEQ_FOPS_RO(mgc_ir_state);
struct lprocfs_seq_vars lprocfs_mgc_obd_vars[] = {
- { "uuid", &mgc_uuid_fops, 0, 0 },
- { "ping", &mgc_ping_fops, 0, 0222 },
- { "connect_flags", &mgc_connect_flags_fops,0, 0 },
- { "mgs_server_uuid", &mgc_server_uuid_fops, 0, 0 },
- { "mgs_conn_uuid", &mgc_conn_uuid_fops, 0, 0 },
- { "import", &mgc_import_fops, 0, 0 },
- { "state", &mgc_state_fops, 0, 0 },
- { "ir_state", &mgc_ir_state_fops, 0, 0 },
+ { .name = "uuid",
+ .fops = &mgc_uuid_fops },
+ { .name = "ping",
+ .fops = &mgc_ping_fops,
+ .proc_mode = 0222 },
+ { .name = "connect_flags",
+ .fops = &mgc_connect_flags_fops },
+ { .name = "mgs_server_uuid",
+ .fops = &mgc_server_uuid_fops },
+ { .name = "mgs_conn_uuid",
+ .fops = &mgc_conn_uuid_fops },
+ { .name = "import",
+ .fops = &mgc_import_fops },
+ { .name = "state",
+ .fops = &mgc_state_fops },
+ { .name = "ir_state",
+ .fops = &mgc_ir_state_fops },
{ 0 }
};
#endif /* LPROCFS */
EXPORT_SYMBOL(lprocfs_init_ldlm_stats);
#ifdef HAVE_SERVER_SUPPORT
-/* No one appears to be using this ?? */
int lprocfs_exp_nid_seq_show(struct seq_file *m, void *data)
{
struct obd_export *exp = m->private;
LPROC_SEQ_FOPS_RO_TYPE(echo, uuid);
static struct lprocfs_seq_vars lprocfs_echo_obd_vars[] = {
- { "uuid", &echo_uuid_fops },
+ { .name = "uuid",
+ .fops = &echo_uuid_fops },
{ 0 }
};
LPROC_SEQ_FOPS_RW_TYPE(osc, pinger_recov);
struct lprocfs_seq_vars lprocfs_osc_obd_vars[] = {
- { "uuid", &osc_uuid_fops },
- { "ping", &osc_ping_fops, 0, 0222 },
- { "connect_flags", &osc_connect_flags_fops },
- { "blocksize", &osc_blksize_fops },
- { "kbytestotal", &osc_kbytestotal_fops },
- { "kbytesfree", &osc_kbytesfree_fops },
- { "kbytesavail", &osc_kbytesavail_fops },
- { "filestotal", &osc_filestotal_fops },
- { "filesfree", &osc_filesfree_fops },
- { "ost_server_uuid", &osc_server_uuid_fops },
- { "ost_conn_uuid", &osc_conn_uuid_fops },
- { "active", &osc_active_fops },
- { "max_pages_per_rpc", &osc_obd_max_pages_per_rpc_fops },
- { "max_rpcs_in_flight", &osc_max_rpcs_in_flight_fops },
- { "destroys_in_flight", &osc_destroys_in_flight_fops },
- { "max_dirty_mb", &osc_max_dirty_mb_fops },
- { "osc_cached_mb", &osc_cached_mb_fops },
- { "cur_dirty_bytes", &osc_cur_dirty_bytes_fops },
- { "cur_grant_bytes", &osc_cur_grant_bytes_fops },
- { "cur_lost_grant_bytes", &osc_cur_lost_grant_bytes_fops },
- { "grant_shrink_interval", &osc_grant_shrink_interval_fops },
- { "checksums", &osc_checksum_fops },
- { "checksum_type", &osc_checksum_type_fops },
- { "resend_count", &osc_resend_count_fops },
- { "timeouts", &osc_timeouts_fops },
- { "contention_seconds", &osc_contention_seconds_fops },
- { "lockless_truncate", &osc_lockless_truncate_fops },
- { "import", &osc_import_fops },
- { "state", &osc_state_fops },
- { "pinger_recov", &osc_pinger_recov_fops },
- { "unstable_stats", &osc_unstable_stats_fops },
+ { .name = "uuid",
+ .fops = &osc_uuid_fops },
+ { .name = "ping",
+ .fops = &osc_ping_fops,
+ .proc_mode = 0222 },
+ { .name = "connect_flags",
+ .fops = &osc_connect_flags_fops },
+ { .name = "blocksize",
+ .fops = &osc_blksize_fops },
+ { .name = "kbytestotal",
+ .fops = &osc_kbytestotal_fops },
+ { .name = "kbytesfree",
+ .fops = &osc_kbytesfree_fops },
+ { .name = "kbytesavail",
+ .fops = &osc_kbytesavail_fops },
+ { .name = "filestotal",
+ .fops = &osc_filestotal_fops },
+ { .name = "filesfree",
+ .fops = &osc_filesfree_fops },
+ { .name = "ost_server_uuid",
+ .fops = &osc_server_uuid_fops },
+ { .name = "ost_conn_uuid",
+ .fops = &osc_conn_uuid_fops },
+ { .name = "active",
+ .fops = &osc_active_fops },
+ { .name = "max_pages_per_rpc",
+ .fops = &osc_obd_max_pages_per_rpc_fops },
+ { .name = "max_rpcs_in_flight",
+ .fops = &osc_max_rpcs_in_flight_fops },
+ { .name = "destroys_in_flight",
+ .fops = &osc_destroys_in_flight_fops },
+ { .name = "max_dirty_mb",
+ .fops = &osc_max_dirty_mb_fops },
+ { .name = "osc_cached_mb",
+ .fops = &osc_cached_mb_fops },
+ { .name = "cur_dirty_bytes",
+ .fops = &osc_cur_dirty_bytes_fops },
+ { .name = "cur_grant_bytes",
+ .fops = &osc_cur_grant_bytes_fops },
+ { .name = "cur_lost_grant_bytes",
+ .fops = &osc_cur_lost_grant_bytes_fops },
+ { .name = "grant_shrink_interval",
+ .fops = &osc_grant_shrink_interval_fops },
+ { .name = "checksums",
+ .fops = &osc_checksum_fops },
+ { .name = "checksum_type",
+ .fops = &osc_checksum_type_fops },
+ { .name = "resend_count",
+ .fops = &osc_resend_count_fops },
+ { .name = "timeouts",
+ .fops = &osc_timeouts_fops },
+ { .name = "contention_seconds",
+ .fops = &osc_contention_seconds_fops },
+ { .name = "lockless_truncate",
+ .fops = &osc_lockless_truncate_fops },
+ { .name = "import",
+ .fops = &osc_import_fops },
+ { .name = "state",
+ .fops = &osc_state_fops },
+ { .name = "pinger_recov",
+ .fops = &osc_pinger_recov_fops },
+ { .name = "unstable_stats",
+ .fops = &osc_unstable_stats_fops },
{ 0 }
};
{
int rc = class_process_proc_seq_param(PARAM_OSC, obd->obd_vars,
lcfg, obd);
- return(rc > 0 ? 0: rc);
+ return rc > 0 ? 0: rc;
}
static int osc_process_config(struct obd_device *obd, obd_count len, void *buf)
LPROC_SEQ_FOPS_RO_TYPE(ost, uuid);
static struct lprocfs_seq_vars lprocfs_ost_obd_vars[] = {
- { "uuid", &ost_uuid_fops },
+ { .name = "uuid",
+ .fops = &ost_uuid_fops },
{ 0 }
};
#endif /* LPROCFS */
*ptr = 0;
do_reconn = 0;
- ptr += strlen("::");
+ ptr += 2; /* Skip :: */
inst = simple_strtol(ptr, &endptr, 10);
if (*endptr) {
CERROR("config: wrong instance # %s\n", ptr);
LPROC_SEQ_FOPS_RO(qpi_state);
static struct lprocfs_seq_vars lprocfs_quota_qpi_vars[] = {
- { "info", &qpi_state_fops },
+ { .name = "info",
+ .fops = &qpi_state_fops },
{ NULL }
};
LPROC_SEQ_FOPS(qsd_timeout);
static struct lprocfs_seq_vars lprocfs_quota_qsd_vars[] = {
- { "info", &qsd_state_fops },
- { "enabled", &qsd_enabled_fops },
- { "force_reint", &qsd_force_reint_fops },
- { "timeout", &qsd_timeout_fops },
+ { .name = "info",
+ .fops = &qsd_state_fops },
+ { .name = "enabled",
+ .fops = &qsd_enabled_fops },
+ { .name = "force_reint",
+ .fops = &qsd_force_reint_fops },
+ { .name = "timeout",
+ .fops = &qsd_timeout_fops },
{ NULL }
};