Whamcloud - gitweb
LU-5152 quota: enforce block quota for chgrp
[fs/lustre-release.git] / lustre / quota / qsd_handler.c
index b3c43a0..eb0bddb 100644 (file)
@@ -652,6 +652,13 @@ static bool qsd_acquire(const struct lu_env *env, struct lquota_entry *lqe,
                         * rc < 0, something bad happened */
                         break;
 
+               /* if we have gotten some quota and stil wait more quota,
+                * it's better to give QMT some time to reclaim from clients */
+               if (count > 0) {
+                       set_current_state(TASK_INTERRUPTIBLE);
+                       schedule_timeout(cfs_time_seconds(1));
+               }
+
                /* need to acquire more quota space from master */
                rc = qsd_acquire_remote(env, lqe);
        }