static int __init cmm_mod_init(void)
{
struct lprocfs_static_vars lvars;
- struct obd_type *type;
- int result;
lprocfs_init_vars(cmm, &lvars);
- result = class_register_type(&cmm_obd_device_ops,
- lvars.module_vars, LUSTRE_CMM0_NAME);
- if (result == 0) {
- type = class_get_type(LUSTRE_CMM0_NAME);
- LASSERT(type != NULL);
- type->typ_lu = &cmm_device_type;
- result = type->typ_lu->ldt_ops->ldto_init(type->typ_lu);
- if (result != 0)
- class_unregister_type(LUSTRE_CMM0_NAME);
- }
- return result;
+ return class_register_type(&cmm_obd_device_ops, lvars.module_vars,
+ LUSTRE_CMM0_NAME, &cmm_device_type);
}
static void __exit cmm_mod_exit(void)
lprocfs_init_vars(quotfmt_test, &lvars);
return class_register_type("fmt_obd_ops, lvars.module_vars,
- "quotfmt_test");
+ "quotfmt_test", NULL);
}
static void __exit quotfmt_test_exit(void)
if (!obd_uuid_empty(&tgt->uuid)) {
CERROR("lov tgt %d not cleaned!"
" deathrow=%d, lovrc=%d\n",
- i, lov->death_row,
+ i, lov->death_row,
atomic_read(&lov->refcount));
lov_del_target(obd, &tgt->uuid, i, 0);
}
if (!desc)
GOTO(out, rc = -EINVAL);
/* see jt_obd_lov_getconfig for variable names */
- /* setparam 0:lov_mdsA 1:default_stripe_size=1048576
+ /* setparam 0:lov_mdsA 1:default_stripe_size=1048576
2:default_stripe_pattern=0 3:default_stripe_offset=0 */
for (i = 1; i < lcfg->lcfg_bufcount; i++) {
char *key, *sval;
if (!page) {
int i = 0;
/* Find an existing osc so we can get it's stupid sizeof(*oap).
- Only because of this layering limitation will a client
+ Only because of this layering limitation will a client
mount with no osts fail */
while (!lov->tgts[i].ltd_exp) {
i++;
- if (i >= lov->desc.ld_tgt_count)
+ if (i >= lov->desc.ld_tgt_count)
RETURN(-ENOTBLK);
}
rc = size_round(sizeof(*lap)) +
GOTO(out, rc);
}
GOTO(out, rc = 0);
- } else if (keylen >= strlen(KEY_LOVDESC) &&
+ } else if (keylen >= strlen(KEY_LOVDESC) &&
strcmp(key, KEY_LOVDESC) == 0) {
struct lov_desc *desc_ret = val;
*desc_ret = lov->desc;
LASSERT(md_exp);
LASSERT(lsm_op_find(lsm->lsm_magic) != NULL);
rc = lsm_op_find(lsm->lsm_magic)->lsm_revalidate(lsm, md_exp->exp_obd);
-
+
RETURN(rc);
}
init_obd_quota_ops(quota_interface, &lov_obd_ops);
rc = class_register_type(&lov_obd_ops, lvars.module_vars,
- OBD_LOV_DEVICENAME);
+ OBD_LOV_DEVICENAME, NULL);
if (rc && quota_interface)
PORTAL_SYMBOL_PUT(osc_quota_interface);
init_obd_quota_ops(quota_interface, &mdc_obd_ops);
rc = class_register_type(&mdc_obd_ops, lvars.module_vars,
- LUSTRE_MDC_NAME);
+ LUSTRE_MDC_NAME, NULL);
if (rc && quota_interface)
PORTAL_SYMBOL_PUT(mdc_quota_interface);
static int __init mdd_mod_init(void)
{
struct lprocfs_static_vars lvars;
- struct obd_type *type;
- int result;
lprocfs_init_vars(mdd, &lvars);
- result = class_register_type(&mdd_obd_device_ops,
- lvars.module_vars, LUSTRE_MDD0_NAME);
- if (result == 0) {
- type = class_get_type(LUSTRE_MDD0_NAME);
- LASSERT(type != NULL);
- type->typ_lu = &mdd_device_type;
- result = type->typ_lu->ldt_ops->ldto_init(type->typ_lu);
- if (result != 0)
- class_unregister_type(LUSTRE_MDD0_NAME);
- }
- return result;
+ return class_register_type(&mdd_obd_device_ops, lvars.module_vars,
+ LUSTRE_MDD0_NAME, &mdd_device_type);
}
static void __exit mdd_mod_exit(void)
init_obd_quota_ops(quota_interface, &mds_obd_ops);
lprocfs_init_vars(mds, &lvars);
- class_register_type(&mds_obd_ops, lvars.module_vars, LUSTRE_MDS_NAME);
+ class_register_type(&mds_obd_ops,
+ lvars.module_vars, LUSTRE_MDS_NAME, NULL);
lprocfs_init_vars(mdt, &lvars);
- class_register_type(&mdt_obd_ops, lvars.module_vars, LUSTRE_MDT_NAME);
+ class_register_type(&mdt_obd_ops,
+ lvars.module_vars, LUSTRE_MDT_NAME, NULL);
return 0;
}
lprocfs_init_vars(mds, &lvars);
class_register_type(&mds_cmd_obd_ops, lvars.module_vars,
- LUSTRE_MDS_NAME);
+ LUSTRE_MDS_NAME, NULL);
return 0;
}
static int __init mdt_mod_init(void)
{
struct lprocfs_static_vars lvars;
- struct obd_type *type;
- int result;
mdt_num_threads = MDT_NUM_THREADS;
lprocfs_init_vars(mdt, &lvars);
- result = class_register_type(&mdt_obd_device_ops,
- lvars.module_vars, LUSTRE_MDT0_NAME);
- if (result == 0) {
- type = class_get_type(LUSTRE_MDT0_NAME);
- LASSERT(type != NULL);
- type->typ_lu = &mdt_device_type;
- result = type->typ_lu->ldt_ops->ldto_init(type->typ_lu);
- if (result != 0)
- class_unregister_type(LUSTRE_MDT0_NAME);
- }
- return result;
+ return class_register_type(&mdt_obd_device_ops, lvars.module_vars,
+ LUSTRE_MDT0_NAME, &mdt_device_type);
}
static void __exit mdt_mod_exit(void)
int __init mgc_init(void)
{
- return class_register_type(&mgc_obd_ops, NULL, LUSTRE_MGC_NAME);
+ return class_register_type(&mgc_obd_ops, NULL, LUSTRE_MGC_NAME, NULL);
}
#ifdef __KERNEL__
struct lprocfs_static_vars lvars;
lprocfs_init_vars(mgs, &lvars);
- class_register_type(&mgs_obd_ops, lvars.module_vars, LUSTRE_MGS_NAME);
+ class_register_type(&mgs_obd_ops,
+ lvars.module_vars, LUSTRE_MGS_NAME, NULL);
return 0;
}
struct lprocfs_static_vars lvars;
lprocfs_init_vars(llog_test, &lvars);
- return class_register_type(&llog_obd_ops,lvars.module_vars,"llog_test");
+ return class_register_type(&llog_obd_ops,
+ lvars.module_vars,"llog_test", NULL);
}
static void __exit llog_test_exit(void)
goto failed_0;
rc = class_register_type(&echo_obd_ops, lvars.module_vars,
- OBD_ECHO_DEVICENAME);
+ OBD_ECHO_DEVICENAME, NULL);
if (rc != 0)
goto failed_1;
lprocfs_init_vars(echo, &lvars);
return class_register_type(&echo_obd_ops, lvars.module_vars,
- OBD_ECHO_CLIENT_DEVICENAME);
+ OBD_ECHO_CLIENT_DEVICENAME, NULL);
}
void echo_client_exit(void)
init_obd_quota_ops(quota_interface, &filter_sanobd_ops);
rc = class_register_type(&filter_obd_ops, lvars.module_vars,
- LUSTRE_OST_NAME);
+ LUSTRE_OST_NAME, NULL);
if (rc)
GOTO(out, rc);
rc = class_register_type(&filter_sanobd_ops, lvars.module_vars,
- LUSTRE_OSTSAN_NAME);
+ LUSTRE_OSTSAN_NAME, NULL);
if (rc) {
class_unregister_type(LUSTRE_OST_NAME);
out:
init_obd_quota_ops(quota_interface, &osc_obd_ops);
rc = class_register_type(&osc_obd_ops, lvars.module_vars,
- LUSTRE_OSC_NAME);
+ LUSTRE_OSC_NAME, NULL);
if (rc) {
if (quota_interface)
PORTAL_SYMBOL_PUT(osc_quota_interface);
#if defined(__KERNEL__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
rc = class_register_type(&sanosc_obd_ops, sanlvars.module_vars,
- LUSTRE_SANOSC_NAME);
+ LUSTRE_SANOSC_NAME, NULL);
if (rc) {
class_unregister_type(LUSTRE_OSC_NAME);
if (quota_interface)
#include "osd_internal.h"
static int osd_root_get (struct dt_device *dev, struct lu_fid *f);
+static int osd_statfs (struct dt_device *dev, struct kstatfs *sfs);
static int lu_device_is_osd (const struct lu_device *d);
static void osd_mod_exit (void) __exit;
{
struct osd_device *osd = dt2osd_dev(d);
struct super_block *sb = osd->od_dt_dev.dd_lmi->lmi_sb;
- int result = -EOPNOTSUPP;
+ int result;
ENTRY;
static int __init osd_mod_init(void)
{
struct lprocfs_static_vars lvars;
- struct obd_type *type;
- int result;
lprocfs_init_vars(osd, &lvars);
- result = class_register_type(&osd_obd_device_ops,
- lvars.module_vars, LUSTRE_OSD0_NAME);
- if (result == 0) {
- type = class_get_type(LUSTRE_OSD0_NAME);
- LASSERT(type != NULL);
- type->typ_lu = &osd_device_type;
- result = type->typ_lu->ldt_ops->ldto_init(type->typ_lu);
- if (result != 0)
- class_unregister_type(LUSTRE_OSD0_NAME);
- }
- return result;
+ return class_register_type(&osd_obd_device_ops, lvars.module_vars,
+ LUSTRE_OSD0_NAME, &osd_device_type);
}
static void __exit osd_mod_exit(void)
lprocfs_init_vars(ost, &lvars);
rc = class_register_type(&ost_obd_ops, lvars.module_vars,
- LUSTRE_OSS_NAME);
+ LUSTRE_OSS_NAME, NULL);
RETURN(rc);
}
lprocfs_init_vars(quotacheck_test, &lvars);
return class_register_type("acheck_obd_ops, lvars.module_vars,
- "quotacheck_test");
+ "quotacheck_test", NULL);
}
static void __exit quotacheck_test_exit(void)
lprocfs_init_vars(quotactl_test, &lvars);
return class_register_type("actl_obd_ops, lvars.module_vars,
- "quotactl_test");
+ "quotactl_test", NULL);
}
static void __exit quotactl_test_exit(void)