}
case LCFG_PARAM: {
- struct lprocfs_static_vars v = { 0 };
- struct obd_device *obd = lod2obd(lod);
+ struct obd_device *obd = lod2obd(lod);
- lprocfs_lod_init_vars(&v);
-
- rc = class_process_proc_param(PARAM_LOV, v.obd_vars, lcfg, obd);
+ rc = class_process_proc_seq_param(PARAM_LOV, obd->obd_vars,
+ lcfg, obd);
if (rc > 0)
rc = 0;
GOTO(out, rc);
if (unlikely(th->th_update != NULL)) {
struct thandle_update *tu = th->th_update;
- struct update_request *update;
+ struct dt_update_request *update;
list_for_each_entry(update, &tu->tu_remote_update_list,
- ur_list) {
- LASSERT(update->ur_dt != NULL);
- rc = dt_trans_start(env, update->ur_dt, th);
+ dur_list) {
+ LASSERT(update->dur_dt != NULL);
+ rc = dt_trans_start(env, update->dur_dt, th);
if (rc != 0)
return rc;
}
static int lod_trans_stop(const struct lu_env *env, struct dt_device *dt,
struct thandle *th)
{
- struct thandle_update *tu = th->th_update;
- struct update_request *update;
- struct update_request *tmp;
- int rc2 = 0;
- int rc;
+ struct thandle_update *tu = th->th_update;
+ struct dt_update_request *update;
+ struct dt_update_request *tmp;
+ int rc2 = 0;
+ int rc;
ENTRY;
rc = dt_trans_stop(env, th->th_dev, th);
if (likely(tu == NULL))
RETURN(rc);
- list_for_each_entry_safe(update, tmp, &tu->tu_remote_update_list,
- ur_list) {
+ list_for_each_entry_safe(update, tmp,
+ &tu->tu_remote_update_list,
+ dur_list) {
/* update will be freed inside dt_trans_stop */
- rc2 = dt_trans_stop(env, update->ur_dt, th);
+ rc2 = dt_trans_stop(env, update->dur_dt, th);
if (unlikely(rc2 != 0 && rc == 0))
rc = rc2;
}
struct lu_device *next = &lod->lod_child->dd_lu_dev;
ENTRY;
- LASSERT(cfs_atomic_read(&lu->ld_ref) == 0);
+ LASSERT(atomic_read(&lu->ld_ref) == 0);
dt_device_fini(&lod->lod_dt_dev);
OBD_FREE_PTR(lod);
RETURN(next);
info->lti_ea_store = NULL;
info->lti_ea_store_size = 0;
}
+ lu_buf_free(&info->lti_linkea_buf);
OBD_FREE_PTR(info);
}
static int __init lod_mod_init(void)
{
- struct lprocfs_static_vars lvars = { 0 };
- cfs_proc_dir_entry_t *lov_proc_dir;
- int rc;
+ struct obd_type *type;
+ int rc;
rc = lu_kmem_init(lod_caches);
if (rc)
return rc;
- lprocfs_lod_init_vars(&lvars);
-
- rc = class_register_type(&lod_obd_device_ops, NULL, NULL,
+ rc = class_register_type(&lod_obd_device_ops, NULL, true, NULL,
#ifndef HAVE_ONLY_PROCFS_SEQ
- lvars.module_vars,
+ NULL,
#endif
- LUSTRE_LOD_NAME, &lod_device_type);
+ LUSTRE_LOD_NAME, &lod_device_type);
if (rc) {
lu_kmem_fini(lod_caches);
return rc;
}
/* create "lov" entry in procfs for compatibility purposes */
- lov_proc_dir = lprocfs_srch(proc_lustre_root, "lov");
- if (lov_proc_dir == NULL) {
- lov_proc_dir = lprocfs_register("lov", proc_lustre_root,
- NULL, NULL);
- if (IS_ERR(lov_proc_dir))
- CERROR("lod: can't create compat entry \"lov\": %d\n",
- (int)PTR_ERR(lov_proc_dir));
- }
+ type = class_search_type(LUSTRE_LOV_NAME);
+ if (type != NULL && type->typ_procroot != NULL)
+ return rc;
+ type = class_search_type(LUSTRE_LOD_NAME);
+ type->typ_procsym = lprocfs_seq_register("lov", proc_lustre_root,
+ NULL, NULL);
+ if (IS_ERR(type->typ_procsym)) {
+ CERROR("lod: can't create compat entry \"lov\": %d\n",
+ (int)PTR_ERR(type->typ_procsym));
+ type->typ_procsym = NULL;
+ }
return rc;
}
static void __exit lod_mod_exit(void)
{
-
- lprocfs_try_remove_proc_entry("lov", proc_lustre_root);
-
class_unregister_type(LUSTRE_LOD_NAME);
lu_kmem_fini(lod_caches);
}