From a1efc41f79a5f1d04e7427d76265e0e95b97e58c Mon Sep 17 00:00:00 2001 From: pravins Date: Mon, 19 May 2008 15:24:49 +0000 Subject: [PATCH] b=14230 i=rahul.deshmukh i=manoj.joseph umds cleanup: use libcfs api. --- lustre/include/lustre_lib.h | 3 --- lustre/mdt/mdt_capa.c | 8 ++++---- lustre/mdt/mdt_internal.h | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lustre/include/lustre_lib.h b/lustre/include/lustre_lib.h index 2b54888..c84b994 100644 --- a/lustre/include/lustre_lib.h +++ b/lustre/include/lustre_lib.h @@ -764,11 +764,8 @@ do { \ #define cfs_wait_event(wq, condition) \ ({ \ - int __ret; \ - \ struct l_wait_info lwi = { 0 }; \ l_wait_event(wq, condition, &lwi); \ - __ret; \ }) #ifdef __KERNEL__ diff --git a/lustre/mdt/mdt_capa.c b/lustre/mdt/mdt_capa.c index 204adf3..0f23e09 100644 --- a/lustre/mdt/mdt_capa.c +++ b/lustre/mdt/mdt_capa.c @@ -171,7 +171,7 @@ int mdt_capa_keys_init(const struct lu_env *env, struct mdt_device *mdt) } } set_capa_key_expiry(mdt); - mod_timer(&mdt->mdt_ck_timer, mdt->mdt_ck_expiry); + cfs_timer_arm(&mdt->mdt_ck_timer, mdt->mdt_ck_expiry); CDEBUG(D_SEC, "mds_ck_timer %lu\n", mdt->mdt_ck_expiry); RETURN(0); } @@ -183,7 +183,7 @@ void mdt_ck_timer_callback(unsigned long castmeharder) ENTRY; thread->t_flags |= SVC_EVENT; - wake_up(&thread->t_ctl_waitq); + cfs_waitq_signal(&thread->t_ctl_waitq); EXIT; } @@ -229,7 +229,7 @@ static int mdt_ck_thread_main(void *args) break; thread->t_flags &= ~SVC_EVENT; - if (time_after(mdt->mdt_ck_expiry, jiffies)) + if (cfs_time_before(cfs_time_current(), mdt->mdt_ck_expiry)) break; *tmp = *rkey; @@ -260,7 +260,7 @@ static int mdt_ck_thread_main(void *args) mdt->mdt_ck_expiry = jiffies + 300 * HZ; } - mod_timer(&mdt->mdt_ck_timer, mdt->mdt_ck_expiry); + cfs_timer_arm(&mdt->mdt_ck_timer, mdt->mdt_ck_expiry); CDEBUG(D_SEC, "mdt_ck_timer %lu\n", mdt->mdt_ck_expiry); } lu_env_fini(&env); diff --git a/lustre/mdt/mdt_internal.h b/lustre/mdt/mdt_internal.h index d943076..aabf8d7 100644 --- a/lustre/mdt/mdt_internal.h +++ b/lustre/mdt/mdt_internal.h @@ -190,7 +190,7 @@ struct mdt_device { struct dt_object *mdt_ck_obj; unsigned long mdt_ck_timeout; unsigned long mdt_ck_expiry; - struct timer_list mdt_ck_timer; + cfs_timer_t mdt_ck_timer; struct ptlrpc_thread mdt_ck_thread; struct lustre_capa_key mdt_capa_keys[2]; unsigned int mdt_capa_conf:1; -- 1.8.3.1