struct lu_env *env;
struct qmt_thread_info *qti;
struct qmt_device *qmt = lu2qmt_dev(ld);
- int pool_id, pool_type, qtype;
+ int pool_type, qtype;
int rc;
ENTRY;
fid_extract_from_quota_res(&qti->qti_fid, &qti->qti_id, &res->lr_name);
/* sanity check the global index FID */
- rc = lquota_extract_fid(&qti->qti_fid, &pool_id, &pool_type, &qtype);
+ rc = lquota_extract_fid(&qti->qti_fid, &pool_type, &qtype);
if (rc) {
- CERROR("can't extract pool information from FID "DFID"\n",
+ CERROR("can't extract glb index information from FID "DFID"\n",
PFID(&qti->qti_fid));
GOTO(out, rc);
}
struct lquota_entry *lqe;
/* Find the quota entry associated with the quota id */
- lqe = qmt_pool_lqe_lookup(env, qmt, pool_id, pool_type, qtype,
+ lqe = qmt_pool_lqe_lookup(env, qmt, pool_type, qtype,
&qti->qti_id);
if (IS_ERR(lqe))
GOTO(out, rc = PTR_ERR(lqe));
qmt_glimpse_cb_t cb, void *arg)
{
struct list_head *tmp, *pos;
- struct list_head gl_list = LIST_HEAD_INIT(gl_list);
+ LIST_HEAD(gl_list);
struct qmt_gl_lock_array locks;
unsigned long i;
int rc = 0;
struct ldlm_resource *res = NULL;
ENTRY;
- lquota_generate_fid(&qti->qti_fid, pool->qpi_key & 0x0000ffff,
- pool->qpi_key >> 16, lqe->lqe_site->lqs_qtype);
+ lquota_generate_fid(&qti->qti_fid, pool->qpi_rtype,
+ lqe->lqe_site->lqs_qtype);
/* send glimpse callback to notify slaves of new quota settings */
qti->qti_gl_desc.lquota_desc.gl_id = lqe->lqe_id;
if (!lqe->lqe_enforced)
RETURN_EXIT;
- lquota_generate_fid(&qti->qti_fid, pool->qpi_key & 0x0000ffff,
- pool->qpi_key >> 16, lqe->lqe_site->lqs_qtype);
+ lquota_generate_fid(&qti->qti_fid, pool->qpi_rtype,
+ lqe->lqe_site->lqs_qtype);
fid_build_quota_res_name(&qti->qti_fid, &lqe->lqe_id, &qti->qti_resid);
res = ldlm_resource_get(qmt->qmt_ns, NULL, &qti->qti_resid, LDLM_PLAIN,
0);
{
struct qmt_device *qmt = (struct qmt_device *)arg;
struct ptlrpc_thread *thread = &qmt->qmt_reba_thread;
- struct l_wait_info lwi = { 0 };
struct lu_env *env;
struct lquota_entry *lqe, *tmp;
int rc;
wake_up(&thread->t_ctl_waitq);
while (1) {
- l_wait_event(thread->t_ctl_waitq,
- !list_empty(&qmt->qmt_reba_list) ||
- !thread_is_running(thread), &lwi);
+ wait_event_idle(thread->t_ctl_waitq,
+ !list_empty(&qmt->qmt_reba_list) ||
+ !thread_is_running(thread));
spin_lock(&qmt->qmt_reba_lock);
list_for_each_entry_safe(lqe, tmp, &qmt->qmt_reba_list,
int qmt_start_reba_thread(struct qmt_device *qmt)
{
struct ptlrpc_thread *thread = &qmt->qmt_reba_thread;
- struct l_wait_info lwi = { 0 };
struct task_struct *task;
ENTRY;
RETURN(PTR_ERR(task));
}
- l_wait_event(thread->t_ctl_waitq,
- thread_is_running(thread) || thread_is_stopped(thread),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq,
+ thread_is_running(thread) || thread_is_stopped(thread));
RETURN(0);
}
struct ptlrpc_thread *thread = &qmt->qmt_reba_thread;
if (!thread_is_stopped(thread)) {
- struct l_wait_info lwi = { 0 };
thread_set_flags(thread, SVC_STOPPING);
wake_up(&thread->t_ctl_waitq);
- l_wait_event(thread->t_ctl_waitq, thread_is_stopped(thread),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq, thread_is_stopped(thread));
}
LASSERT(list_empty(&qmt->qmt_reba_list));
}