X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fmdt%2Fmdt_capa.c;h=0df5450d1615e7096a82cf88b77637b71d3f7920;hb=d2b203692e24cde8e39266f91e9a150c5a287111;hp=4f6a44cd27a614b4433dc35e2abc6995b9737280;hpb=e089a515efae3391709b997be889ebe0f3306e9d;p=fs%2Flustre-release.git diff --git a/lustre/mdt/mdt_capa.c b/lustre/mdt/mdt_capa.c index 4f6a44c..0df5450 100644 --- a/lustre/mdt/mdt_capa.c +++ b/lustre/mdt/mdt_capa.c @@ -27,7 +27,7 @@ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, 2013, Intel Corporation. + * Copyright (c) 2012, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -46,11 +46,11 @@ static inline void set_capa_key_expiry(struct mdt_device *mdt) { - mdt->mdt_ck_expiry = jiffies + mdt->mdt_ck_timeout * HZ; + mdt->mdt_ck_expiry = jiffies + msecs_to_jiffies(mdt->mdt_ck_timeout * + MSEC_PER_SEC); } -static void make_capa_key(struct lustre_capa_key *key, - mdsno_t mdsnum, int keyid) +static void make_capa_key(struct lustre_capa_key *key, u32 mdsnum, int keyid) { key->lk_seq = mdsnum; key->lk_keyid = keyid + 1; @@ -91,7 +91,8 @@ static int write_capa_keys(const struct lu_env *env, RETURN(PTR_ERR(th)); rc = dt_declare_record_write(env, mdt->mdt_ck_obj, - sizeof(*tmp) * 3, 0, th); + mdt_buf_const(env, NULL, + sizeof(*tmp) * 3), 0, th); if (rc) goto stop; @@ -149,7 +150,7 @@ int mdt_capa_keys_init(const struct lu_env *env, struct mdt_device *mdt) struct mdt_thread_info *mti; struct dt_object *obj; struct lu_attr *la; - mdsno_t mdsnum; + u32 mdsnum; unsigned long size; int rc; ENTRY; @@ -214,7 +215,7 @@ static int mdt_ck_thread_main(void *args) struct mdt_thread_info *info; struct md_device *next; struct l_wait_info lwi = { 0 }; - mdsno_t mdsnum; + u32 mdsnum; int rc; ENTRY; @@ -275,7 +276,9 @@ static int mdt_ck_thread_main(void *args) if (rc) { DEBUG_CAPA_KEY(D_ERROR, rkey, "update failed for"); /* next retry is in 300 sec */ - mdt->mdt_ck_expiry = jiffies + 300 * HZ; + mdt->mdt_ck_expiry = jiffies + + msecs_to_jiffies(300 * + MSEC_PER_SEC); } cfs_timer_arm(&mdt->mdt_ck_timer, mdt->mdt_ck_expiry); @@ -291,7 +294,7 @@ static int mdt_ck_thread_main(void *args) int mdt_ck_thread_start(struct mdt_device *mdt) { struct ptlrpc_thread *thread = &mdt->mdt_ck_thread; - cfs_task_t *task; + struct task_struct *task; init_waitqueue_head(&thread->t_ctl_waitq); task = kthread_run(mdt_ck_thread_main, mdt, "mdt_ck");