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 }
};
struct lu_server_fld *fld;
struct dt_object *obj;
const struct dt_it_ops *iops;
+ struct dt_key *key;
+ int rc;
if (param == NULL || param->fsp_stop)
return NULL;
LASSERT(obj != NULL);
iops = &obj->do_index_ops->dio_it;
- iops->load(¶m->fsp_env, param->fsp_it, *pos);
+ rc = iops->load(¶m->fsp_env, param->fsp_it, *pos);
+ if (rc <= 0)
+ return NULL;
+
+ key = iops->key(¶m->fsp_env, param->fsp_it);
+ if (IS_ERR(key))
+ return NULL;
+
+ *pos = be64_to_cpu(*(__u64 *)key);
- *pos = be64_to_cpu(*(__u64 *)iops->key(¶m->fsp_env, param->fsp_it));
return param;
}
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