X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fllog_obd.c;h=aa9c3c006f88b3c09b759529b2288ce4397f4749;hp=8bf6b41d4c2a2423c04ec3bf398e39e3326615db;hb=6fb209991e80cf71d97ad566d1a757e4a31466e0;hpb=0e2f0916f338c93c0944e7ff1d6240caa3e85cfc diff --git a/lustre/obdclass/llog_obd.c b/lustre/obdclass/llog_obd.c index 8bf6b41..aa9c3c0 100644 --- a/lustre/obdclass/llog_obd.c +++ b/lustre/obdclass/llog_obd.c @@ -476,3 +476,22 @@ int obd_llog_finish(struct obd_device *obd, int count) RETURN(rc); } EXPORT_SYMBOL(obd_llog_finish); + +/* context key constructor/destructor: llog_key_init, llog_key_fini */ +LU_KEY_INIT_FINI(llog, struct llog_thread_info); +/* context key: llog_thread_key */ +LU_CONTEXT_KEY_DEFINE(llog, LCT_MD_THREAD | LCT_MG_THREAD | LCT_LOCAL); +LU_KEY_INIT_GENERIC(llog); +EXPORT_SYMBOL(llog_thread_key); + +int llog_info_init(void) +{ + llog_key_init_generic(&llog_thread_key, NULL); + lu_context_key_register(&llog_thread_key); + return 0; +} + +void llog_info_fini(void) +{ + lu_context_key_degister(&llog_thread_key); +}