X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fquota%2Fquota_interface.c;h=2ef1b67b9a129cae0c59d0264e202ee6320aa55c;hb=777cefdfd2bb28d5eda3723077a03ef2aeadedff;hp=5cf9505bd8907f6104e81118f97c8a7c257fb784;hpb=e9dc8feb37943024452dcc5acb3f96b95c6a518d;p=fs%2Flustre-release.git diff --git a/lustre/quota/quota_interface.c b/lustre/quota/quota_interface.c index 5cf9505..2ef1b67 100644 --- a/lustre/quota/quota_interface.c +++ b/lustre/quota/quota_interface.c @@ -45,14 +45,10 @@ # include # include # include -# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -# include -# include -# include -# include -# else -# include -# endif +# include +# include +# include +# include #else /* __KERNEL__ */ # include #endif @@ -141,6 +137,7 @@ static int filter_quota_clearinfo(struct obd_export *exp, struct obd_device *obd spin_lock(&qctxt->lqc_lock); qctxt->lqc_import = NULL; spin_unlock(&qctxt->lqc_lock); + dqacq_interrupt(qctxt); CDEBUG(D_QUOTA, "%s: lqc_import of obd(%p) is invalid now.\n", obd->obd_name, obd); } @@ -287,14 +284,17 @@ static int quota_check_common(struct obd_device *obd, unsigned int uid, /* in order to complete this write, we need extra * meta blocks. This function can get it through * data needed to be written b=16542 */ - mb = *pending; - LASSERT(inode && frags > 0); - if (fsfilt_get_mblk(obd, qctxt->lqc_sb, &mb, - inode, frags) < 0) - CDEBUG(D_ERROR, - "can't get extra meta blocks.\n"); - else - *pending += mb; + if (inode) { + mb = *pending; + rc = fsfilt_get_mblk(obd, qctxt->lqc_sb, + &mb, inode,frags); + if (rc) + CDEBUG(D_ERROR, + "can't get extra " + "meta blocks.\n"); + else + *pending += mb; + } lqs->lqs_bwrite_pending += *pending; } else { *pending = count; @@ -381,7 +381,7 @@ static int quota_chk_acq_common(struct obd_device *obd, unsigned int uid, /* please reference to dqacq_completion for the below */ /* a new request is finished, try again */ - if (rc == -EAGAIN) { + if (rc == QUOTA_REQ_RETURNED) { CDEBUG(D_QUOTA, "finish a quota req, try again\n"); continue; }