Example #1
0
/**
 * A mutex serializing calls to vvp_inode_fini() under extreme memory
 * pressure, when environments cannot be allocated.
 */
int vvp_global_init(void)
{
    int result;

    result = lu_kmem_init(vvp_caches);
    if (result == 0) {
        result = ccc_global_init(&vvp_device_type);
        if (result != 0)
            lu_kmem_fini(vvp_caches);
    }
    return result;
}
Example #2
0
/*
 * Global initialization performed at module load time
 */
int qsd_glb_init(void)
{
	int	rc;

	rc = lu_kmem_init(qsd_caches);
	if (rc)
		return rc;

	qsd_key_init_generic(&qsd_thread_key, NULL);
	lu_context_key_register(&qsd_thread_key);
	lustre_register_quota_process_config(qsd_process_config);

	return 0;
}
Example #3
0
/**
 * A mutex serializing calls to vvp_inode_fini() under extreme memory
 * pressure, when environments cannot be allocated.
 */
int vvp_global_init(void)
{
	int rc;

	rc = lu_kmem_init(vvp_caches);
	if (rc != 0)
		return rc;

	rc = lu_device_type_init(&vvp_device_type);
	if (rc != 0)
		goto out_kmem;

	return 0;

out_kmem:
	lu_kmem_fini(vvp_caches);

	return rc;
}
Example #4
0
static int __init mdd_mod_init(void)
{
	int rc;

	rc = lu_kmem_init(mdd_caches);
	if (rc)
		return rc;

	changelog_orig_logops = llog_osd_ops;
	changelog_orig_logops.lop_cancel = llog_changelog_cancel;
	changelog_orig_logops.lop_add = llog_cat_add_rec;
	changelog_orig_logops.lop_declare_add = llog_cat_declare_add_rec;

	hsm_actions_logops = llog_osd_ops;
	hsm_actions_logops.lop_add = llog_cat_add_rec;
	hsm_actions_logops.lop_declare_add = llog_cat_declare_add_rec;

	rc = class_register_type(&mdd_obd_device_ops, NULL, true, NULL,
				 LUSTRE_MDD_NAME, &mdd_device_type);
	if (rc)
		lu_kmem_fini(mdd_caches);
	return rc;
}