X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fquota%2Fquota_check.c;h=599ea4c0982df37f47b657ea9a19129b3d362bc4;hb=b938b88935d44bd4d16ba48c7a97941676254c11;hp=c6e8daa4c55cfb05eebeb65b51827c46b493c52f;hpb=dffbba9abaeadd63ab765234a91d271410e16bc6;p=fs%2Flustre-release.git diff --git a/lustre/quota/quota_check.c b/lustre/quota/quota_check.c index c6e8daa..599ea4c 100644 --- a/lustre/quota/quota_check.c +++ b/lustre/quota/quota_check.c @@ -174,8 +174,8 @@ int target_quota_check(struct obd_device *obd, struct obd_export *exp, /* we get ref for exp because target_quotacheck_callback() will use this * export later b=18126 */ class_export_get(exp); - rc = cfs_kernel_thread(target_quotacheck_thread, qta, - CLONE_VM|CLONE_FILES); + rc = cfs_create_thread(target_quotacheck_thread, qta, + CFS_DAEMON_FLAGS); if (rc >= 0) { /* target_quotacheck_thread will drop the ref on exp and release * obt_quotachecking */ @@ -301,7 +301,17 @@ int lov_quota_check(struct obd_device *unused, struct obd_export *exp, obd_getref(obd); for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) { + if (!lov->lov_tgts[i]) + continue; + + /* Skip quota check on the administratively disabled OSTs. */ + if (!lov->lov_tgts[i]->ltd_activate) { + CWARN("lov idx %d was administratively disabled, " + "skip quotacheck on it.\n", i); + continue; + } + + if (!lov->lov_tgts[i]->ltd_active) { CERROR("lov idx %d inactive\n", i); rc = -EIO; goto out; @@ -311,6 +321,9 @@ int lov_quota_check(struct obd_device *unused, struct obd_export *exp, for (i = 0; i < lov->desc.ld_tgt_count; i++) { int err; + if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_activate) + continue; + err = obd_quotacheck(lov->lov_tgts[i]->ltd_exp, oqctl); if (err && !rc) rc = err;