Home
last modified time | relevance | path

Searched refs:obd (Results 1 – 25 of 57) sorted by relevance

123

/drivers/staging/lustre/lustre/obdclass/
Dobd_config.c179 struct obd_device *obd = NULL; in class_attach() local
204 obd = class_newdev(typename, name); in class_attach()
205 if (IS_ERR(obd)) { in class_attach()
207 rc = PTR_ERR(obd); in class_attach()
208 obd = NULL; in class_attach()
213 LASSERTF(obd != NULL, "Cannot get obd device %s of type %s\n", in class_attach()
215 LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC, in class_attach()
217 obd, obd->obd_magic, OBD_DEVICE_MAGIC); in class_attach()
218 LASSERTF(strncmp(obd->obd_name, name, strlen(name)) == 0, in class_attach()
219 "%p obd_name %s != %s\n", obd, obd->obd_name, name); in class_attach()
[all …]
Dgenops.c69 struct obd_device *obd; in obd_device_alloc() local
71 obd = kmem_cache_alloc(obd_device_cachep, GFP_NOFS | __GFP_ZERO); in obd_device_alloc()
72 if (obd != NULL) in obd_device_alloc()
73 obd->obd_magic = OBD_DEVICE_MAGIC; in obd_device_alloc()
74 return obd; in obd_device_alloc()
77 static void obd_device_free(struct obd_device *obd) in obd_device_free() argument
79 LASSERT(obd != NULL); in obd_device_free()
80 LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC, "obd %p obd_magic %08x != %08x\n", in obd_device_free()
81 obd, obd->obd_magic, OBD_DEVICE_MAGIC); in obd_device_free()
82 if (obd->obd_namespace != NULL) { in obd_device_free()
[all …]
Dllog_obd.c44 static struct llog_ctxt *llog_new_ctxt(struct obd_device *obd) in llog_new_ctxt() argument
52 ctxt->loc_obd = obd; in llog_new_ctxt()
74 struct obd_device *obd; in __llog_ctxt_put() local
85 obd = ctxt->loc_obd; in __llog_ctxt_put()
86 spin_lock(&obd->obd_dev_lock); in __llog_ctxt_put()
88 spin_unlock(&obd->obd_dev_lock); in __llog_ctxt_put()
92 LASSERTF(obd->obd_starting == 1 || in __llog_ctxt_put()
93 obd->obd_stopping == 1 || obd->obd_set_up == 0, in __llog_ctxt_put()
94 "wrong obd state: %d/%d/%d\n", !!obd->obd_starting, in __llog_ctxt_put()
95 !!obd->obd_stopping, !!obd->obd_set_up); in __llog_ctxt_put()
[all …]
Dlprocfs_status.c363 struct obd_device *obd = container_of(kobj, struct obd_device, in uuid_show() local
366 return sprintf(buf, "%s\n", obd->obd_uuid.uuid); in uuid_show()
373 struct obd_device *obd = container_of(kobj, struct obd_device, in blocksize_show() local
376 int rc = obd_statfs(NULL, obd->obd_self_export, &osfs, in blocksize_show()
389 struct obd_device *obd = container_of(kobj, struct obd_device, in kbytestotal_show() local
392 int rc = obd_statfs(NULL, obd->obd_self_export, &osfs, in kbytestotal_show()
412 struct obd_device *obd = container_of(kobj, struct obd_device, in kbytesfree_show() local
415 int rc = obd_statfs(NULL, obd->obd_self_export, &osfs, in kbytesfree_show()
435 struct obd_device *obd = container_of(kobj, struct obd_device, in kbytesavail_show() local
438 int rc = obd_statfs(NULL, obd->obd_self_export, &osfs, in kbytesavail_show()
[all …]
Dclass_obd.c171 struct obd_device *obd = NULL; in class_handle_ioctl() local
314 obd = class_num2obd(index); in class_handle_ioctl()
315 if (!obd) { in class_handle_ioctl()
320 if (obd->obd_stopping) in class_handle_ioctl()
322 else if (obd->obd_set_up) in class_handle_ioctl()
324 else if (obd->obd_attached) in class_handle_ioctl()
330 (int)index, status, obd->obd_type->typ_name, in class_handle_ioctl()
331 obd->obd_name, obd->obd_uuid.uuid, in class_handle_ioctl()
332 atomic_read(&obd->obd_refcount)); in class_handle_ioctl()
350 obd = class_name2obd(data->ioc_inlbuf4); in class_handle_ioctl()
[all …]
Dobd_mount.c207 struct obd_device *obd; in lustre_start_mgc() local
247 obd = class_name2obd(mgcname); in lustre_start_mgc()
248 if (obd && !obd->obd_stopping) { in lustre_start_mgc()
251 rc = obd_set_info_async(NULL, obd->obd_self_export, in lustre_start_mgc()
258 atomic_inc(&obd->u.cli.cl_mgc_refcount); in lustre_start_mgc()
266 rc = obd_get_info(NULL, obd->obd_self_export, in lustre_start_mgc()
292 rc = obd_set_info_async(NULL, obd->obd_self_export, in lustre_start_mgc()
364 obd = class_name2obd(mgcname); in lustre_start_mgc()
365 if (!obd) { in lustre_start_mgc()
371 rc = obd_set_info_async(NULL, obd->obd_self_export, in lustre_start_mgc()
[all …]
/drivers/staging/lustre/lustre/include/
Dobd_class.h80 void class_release_dev(struct obd_device *obd);
108 struct obd_device *class_incref(struct obd_device *obd,
110 void class_decref(struct obd_device *obd,
201 struct obd_import *class_new_import(struct obd_device *obd);
205 int class_connect(struct lustre_handle *conn, struct obd_device *obd,
209 int class_manual_cleanup(struct obd_device *obd);
247 static inline enum obd_option exp_flags_from_obd(struct obd_device *obd) in exp_flags_from_obd() argument
249 return ((obd->obd_fail ? OBD_OPT_FAILOVER : 0) | in exp_flags_from_obd()
250 (obd->obd_force ? OBD_OPT_FORCE : 0) | in exp_flags_from_obd()
254 static inline int lprocfs_climp_check(struct obd_device *obd) in lprocfs_climp_check() argument
[all …]
Dlustre_log.h97 int llog_backup(const struct lu_env *env, struct obd_device *obd,
141 int llog_setup(const struct lu_env *env, struct obd_device *obd,
158 int (*lop_setup)(const struct lu_env *env, struct obd_device *obd,
333 static inline struct llog_ctxt *llog_get_context(struct obd_device *obd, in llog_get_context() argument
336 return llog_group_get_ctxt(&obd->obd_olg, index); in llog_get_context()
344 static inline int llog_ctxt_null(struct obd_device *obd, int index) in llog_ctxt_null() argument
346 return llog_group_ctxt_null(&obd->obd_olg, index); in llog_ctxt_null()
Dobd.h366 #define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid) argument
1003 int (*o_fid_init)(struct obd_device *obd,
1005 int (*o_fid_fini)(struct obd_device *obd);
1062 int (*o_notify)(struct obd_device *obd, struct obd_device *watched,
1075 int (*o_pool_new)(struct obd_device *obd, char *poolname);
1076 int (*o_pool_del)(struct obd_device *obd, char *poolname);
1077 int (*o_pool_add)(struct obd_device *obd, char *poolname,
1079 int (*o_pool_rem)(struct obd_device *obd, char *poolname,
1081 void (*o_getref)(struct obd_device *obd);
1082 void (*o_putref)(struct obd_device *obd);
[all …]
/drivers/staging/lustre/lustre/lmv/
Dlmv_obd.c80 struct obd_device *obd; in lmv_set_mdc_active() local
105 obd = class_exp2obd(tgt->ltd_exp); in lmv_set_mdc_active()
106 if (obd == NULL) { in lmv_set_mdc_active()
112 obd->obd_name, obd->obd_uuid.uuid, obd->obd_minor, obd, in lmv_set_mdc_active()
113 obd->obd_type->typ_name, i); in lmv_set_mdc_active()
114 LASSERT(strcmp(obd->obd_type->typ_name, LUSTRE_MDC_NAME) == 0); in lmv_set_mdc_active()
117 CDEBUG(D_INFO, "OBD %p already %sactive!\n", obd, in lmv_set_mdc_active()
122 CDEBUG(D_INFO, "Marking OBD %p %sactive\n", obd, in lmv_set_mdc_active()
138 static int lmv_notify(struct obd_device *obd, struct obd_device *watched, in lmv_notify() argument
142 struct lmv_obd *lmv = &obd->u.lmv; in lmv_notify()
[all …]
Dlmv_intent.c61 struct obd_device *obd = exp->exp_obd; in lmv_intent_remote() local
62 struct lmv_obd *lmv = &obd->u.lmv; in lmv_intent_remote()
165 struct obd_device *obd = exp->exp_obd; in lmv_intent_open() local
166 struct lmv_obd *lmv = &obd->u.lmv; in lmv_intent_open()
248 struct obd_device *obd = exp->exp_obd; in lmv_intent_lookup() local
249 struct lmv_obd *lmv = &obd->u.lmv; in lmv_intent_lookup()
298 struct obd_device *obd = exp->exp_obd; in lmv_intent_lock() local
308 rc = lmv_check_connect(obd); in lmv_intent_lock()
/drivers/staging/lustre/lustre/obdclass/linux/
Dlinux-module.c240 struct obd_device *obd; in health_show() local
242 obd = class_num2obd(i); in health_show()
243 if (obd == NULL || !obd->obd_attached || !obd->obd_set_up) in health_show()
246 LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); in health_show()
247 if (obd->obd_stopping) in health_show()
250 class_incref(obd, __func__, current); in health_show()
253 if (obd_health_check(NULL, obd)) { in health_show()
256 class_decref(obd, __func__, current); in health_show()
360 struct obd_device *obd = class_num2obd((int)index); in obd_device_list_seq_show() local
363 if (obd == NULL) in obd_device_list_seq_show()
[all …]
/drivers/staging/lustre/lustre/mgc/
Dmgc_request.c189 struct config_llog_data *do_config_log_add(struct obd_device *obd, in do_config_log_add() argument
218 cld->cld_mgcexp = class_export_get(obd->obd_self_export); in do_config_log_add()
222 cld->cld_cfg.cfg_obdname = obd->obd_name; in do_config_log_add()
237 rc = mgc_process_log(obd, cld); in do_config_log_add()
245 static struct config_llog_data *config_recover_log_add(struct obd_device *obd, in config_recover_log_add() argument
261 cld = do_config_log_add(obd, logname, CONFIG_T_RECOVER, &lcfg, sb); in config_recover_log_add()
265 static struct config_llog_data *config_params_log_add(struct obd_device *obd, in config_params_log_add() argument
273 cld = do_config_log_add(obd, PARAMS_FILENAME, CONFIG_T_PARAMS, in config_params_log_add()
284 static int config_log_add(struct obd_device *obd, char *logname, in config_log_add() argument
313 sptlrpc_cld = do_config_log_add(obd, seclogname, in config_log_add()
[all …]
/drivers/staging/lustre/lustre/lov/
Dlov_obd.c65 static void lov_getref(struct obd_device *obd) in lov_getref() argument
67 struct lov_obd *lov = &obd->u.lov; in lov_getref()
76 static void __lov_del_obd(struct obd_device *obd, struct lov_tgt_desc *tgt);
78 static void lov_putref(struct obd_device *obd) in lov_putref() argument
80 struct lov_obd *lov = &obd->u.lov; in lov_putref()
109 __lov_del_obd(obd, tgt); in lov_putref()
120 static int lov_set_osc_active(struct obd_device *obd, struct obd_uuid *uuid,
122 static int lov_notify(struct obd_device *obd, struct obd_device *watched,
126 int lov_connect_obd(struct obd_device *obd, __u32 index, int activate, in lov_connect_obd() argument
129 struct lov_obd *lov = &obd->u.lov; in lov_connect_obd()
[all …]
Dlov_internal.h154 int qos_add_tgt(struct obd_device *obd, __u32 index);
155 int qos_del_tgt(struct obd_device *obd, struct lov_tgt_desc *tgt);
160 void qos_statfs_update(struct obd_device *obd, __u64 max_age, int wait);
185 int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
189 int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs,
201 int lov_connect_obd(struct obd_device *obd, __u32 index, int activate,
203 int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg);
204 int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg,
206 int lov_del_target(struct obd_device *obd, __u32 index,
246 int lov_pool_new(struct obd_device *obd, char *poolname);
[all …]
Dlov_pool.c400 int lov_pool_new(struct obd_device *obd, char *poolname) in lov_pool_new() argument
406 lov = &(obd->u.lov); in lov_pool_new()
416 new_pool->pool_lobd = obd; in lov_pool_new()
448 spin_lock(&obd->obd_dev_lock); in lov_pool_new()
451 spin_unlock(&obd->obd_dev_lock); in lov_pool_new()
467 spin_lock(&obd->obd_dev_lock); in lov_pool_new()
470 spin_unlock(&obd->obd_dev_lock); in lov_pool_new()
481 int lov_pool_del(struct obd_device *obd, char *poolname) in lov_pool_del() argument
486 lov = &(obd->u.lov); in lov_pool_del()
499 spin_lock(&obd->obd_dev_lock); in lov_pool_del()
[all …]
Dlov_dev.c397 struct obd_device *obd = dev->ld_obd; in lov_cl_add_target() local
404 obd_getref(obd); in lov_cl_add_target()
406 tgt = obd->u.lov.lov_tgts[index]; in lov_cl_add_target()
433 obd_putref(obd); in lov_cl_add_target()
440 struct obd_device *obd = d->ld_obd; in lov_process_config() local
446 obd_getref(obd); in lov_process_config()
463 obd_putref(obd); in lov_process_config()
478 struct obd_device *obd; in lov_device_alloc() local
494 obd = class_name2obd(lustre_cfg_string(cfg, 0)); in lov_device_alloc()
495 LASSERT(obd != NULL); in lov_device_alloc()
[all …]
/drivers/staging/lustre/lustre/osc/
Dlproc_osc.c271 struct obd_device *obd = container_of(kobj, struct obd_device, in cur_grant_bytes_store() local
273 struct client_obd *cli = &obd->u.cli; in cur_grant_bytes_store()
318 struct obd_device *obd = container_of(kobj, struct obd_device, in grant_shrink_interval_show() local
321 return sprintf(buf, "%d\n", obd->u.cli.cl_grant_shrink_interval); in grant_shrink_interval_show()
329 struct obd_device *obd = container_of(kobj, struct obd_device, in grant_shrink_interval_store() local
341 obd->u.cli.cl_grant_shrink_interval = val; in grant_shrink_interval_store()
351 struct obd_device *obd = container_of(kobj, struct obd_device, in checksums_show() local
354 return sprintf(buf, "%d\n", obd->u.cli.cl_checksum ? 1 : 0); in checksums_show()
362 struct obd_device *obd = container_of(kobj, struct obd_device, in checksums_store() local
371 obd->u.cli.cl_checksum = (val ? 1 : 0); in checksums_store()
[all …]
Dosc_request.c107 int osc_cleanup(struct obd_device *obd);
2071 struct obd_device *obd = class_exp2obd(exp); in osc_find_cbdata() local
2075 rc = ldlm_resource_iterate(obd->obd_namespace, &res_id, replace, data); in osc_find_cbdata()
2196 struct obd_device *obd = exp->exp_obd; in osc_enqueue_base() local
2232 mode = ldlm_lock_match(obd->obd_namespace, *flags | match_lvb, res_id, in osc_enqueue_base()
2341 struct obd_device *obd = exp->exp_obd; in osc_match_base() local
2360 rc = ldlm_lock_match(obd->obd_namespace, lflags, in osc_match_base()
2428 struct obd_device *obd = class_exp2obd(exp); in osc_statfs_async() local
2439 req = ptlrpc_request_alloc(obd->u.cli.cl_import, &RQF_OST_STATFS); in osc_statfs_async()
2470 struct obd_device *obd = class_exp2obd(exp); in osc_statfs() local
[all …]
Dosc_dev.c217 struct obd_device *obd; in osc_device_alloc() local
230 obd = class_name2obd(lustre_cfg_string(cfg, 0)); in osc_device_alloc()
231 LASSERT(obd != NULL); in osc_device_alloc()
232 rc = osc_setup(obd, cfg); in osc_device_alloc()
237 od->od_exp = obd->obd_self_export; in osc_device_alloc()
Dosc_internal.h133 int osc_process_config_base(struct obd_device *obd, struct lustre_cfg *cfg);
140 int osc_cleanup(struct obd_device *obd);
141 int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg);
189 int osc_quota_setup(struct obd_device *obd);
190 int osc_quota_cleanup(struct obd_device *obd);
/drivers/staging/lustre/lustre/mdc/
Dmdc_request.c56 static int mdc_cleanup(struct obd_device *obd);
782 struct obd_device *obd = class_exp2obd(exp); in mdc_close() local
796 obd->obd_name, PFID(&op_data->op_fid1), rc); in mdc_close()
841 obd->u.cli.cl_default_mds_easize); in mdc_close()
843 obd->u.cli.cl_default_mds_cookiesize); in mdc_close()
847 mdc_get_rpc_lock(obd->u.cli.cl_close_lock, NULL); in mdc_close()
849 mdc_put_rpc_lock(obd->u.cli.cl_close_lock, NULL); in mdc_close()
898 struct obd_device *obd = class_exp2obd(exp); in mdc_done_writing() local
930 mdc_get_rpc_lock(obd->u.cli.cl_close_lock, NULL); in mdc_done_writing()
932 mdc_put_rpc_lock(obd->u.cli.cl_close_lock, NULL); in mdc_done_writing()
[all …]
Dmdc_reint.c110 struct obd_device *obd = exp->exp_obd; in mdc_setattr() local
143 rpc_lock = obd->u.cli.cl_rpc_lock; in mdc_setattr()
307 struct obd_device *obd = class_exp2obd(exp); in mdc_unlink() local
343 obd->u.cli.cl_default_mds_easize); in mdc_unlink()
345 obd->u.cli.cl_default_mds_cookiesize); in mdc_unlink()
350 rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, LUSTRE_IMP_FULL); in mdc_unlink()
360 struct obd_device *obd = exp->exp_obd; in mdc_link() local
392 rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, LUSTRE_IMP_FULL); in mdc_link()
405 struct obd_device *obd = exp->exp_obd; in mdc_rename() local
452 obd->u.cli.cl_default_mds_easize); in mdc_rename()
[all …]
/drivers/staging/lustre/lustre/ldlm/
Dldlm_lib.c490 struct obd_device *obd, struct obd_uuid *cluuid, in client_connect_import() argument
493 struct client_obd *cli = &obd->u.cli; in client_connect_import()
506 rc = class_connect(&conn, obd, cluuid); in client_connect_import()
513 LASSERT(obd->obd_namespace); in client_connect_import()
557 struct obd_device *obd = class_exp2obd(exp); in client_disconnect_export() local
562 if (!obd) { in client_disconnect_export()
568 cli = &obd->u.cli; in client_disconnect_export()
572 CDEBUG(D_INFO, "disconnect %s - %d\n", obd->obd_name, in client_disconnect_export()
577 obd->obd_name); in client_disconnect_export()
600 if (obd->obd_namespace != NULL) { in client_disconnect_export()
[all …]
/drivers/staging/lustre/lustre/ptlrpc/
Dlproc_ptlrpc.c1176 void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd) in ptlrpc_lprocfs_unregister_obd() argument
1178 if (!IS_ERR_OR_NULL(obd->obd_svc_debugfs_entry)) in ptlrpc_lprocfs_unregister_obd()
1179 ldebugfs_remove(&obd->obd_svc_debugfs_entry); in ptlrpc_lprocfs_unregister_obd()
1181 if (obd->obd_svc_stats) in ptlrpc_lprocfs_unregister_obd()
1182 lprocfs_free_stats(&obd->obd_svc_stats); in ptlrpc_lprocfs_unregister_obd()
1191 struct obd_device *obd = ((struct seq_file *)file->private_data)->private; in lprocfs_wr_ping() local
1195 rc = lprocfs_climp_check(obd); in lprocfs_wr_ping()
1199 req = ptlrpc_prep_ping(obd->u.cli.cl_import); in lprocfs_wr_ping()
1200 LPROCFS_CLIMP_EXIT(obd); in lprocfs_wr_ping()
1222 struct obd_device *obd = ((struct seq_file *)file->private_data)->private; in lprocfs_wr_import() local
[all …]

123