#include "lquota_internal.h"
-static int hash_lqs_cur_bits = HASH_LQS_CUR_BITS;
-CFS_MODULE_PARM(hash_lqs_cur_bits, "i", int, 0444,
- "the current bits of lqs hash");
-
/* register lquota key */
LU_KEY_INIT_FINI(lquota, struct lquota_thread_info);
LU_CONTEXT_KEY_DEFINE(lquota, LCT_MD_THREAD | LCT_DT_THREAD | LCT_LOCAL);
static int __init init_lquota(void)
{
- /* new quota initialization */
+ int rc;
+ ENTRY;
+
lquota_key_init_generic(&lquota_thread_key, NULL);
lu_context_key_register(&lquota_thread_key);
#warning "remove old quota compatibility code"
#endif
- return 0;
+ rc = qmt_glb_init();
+ if (rc)
+ GOTO(out_key, rc);
+
+ rc = qsd_glb_init();
+ if (rc)
+ GOTO(out_qmt, rc);
+
+ RETURN(0);
+
+out_qmt:
+ qmt_glb_fini();
+out_key:
+ lu_context_key_degister(&lquota_thread_key);
+ return rc;
}
static void exit_lquota(void)
{
+ qsd_glb_fini();
+ qmt_glb_fini();
lu_context_key_degister(&lquota_thread_key);
}