Lustre always trigger grace time when the allocated qunit exceeding
softlimit, however, user tools 'lfs quota' only print grace time
when the total usage greater than softlimit, so sometimes user can't
tell if the softlimit is already exceeded from 'lfs quota' output.
This patch changes the 'lfs quota' to use the data get from kernel
instead of comparing usage with softlimit.
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I320cd0fafcb92e8b91f688b2c8bb50bc44442a09
Reviewed-on: http://review.whamcloud.com/1667
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
if (dqb->dqb_bhardlimit &&
toqb(dqb->dqb_curspace) >= dqb->dqb_bhardlimit) {
bover = 1;
- } else if (dqb->dqb_bsoftlimit &&
- toqb(dqb->dqb_curspace) >= dqb->dqb_bsoftlimit) {
+ } else if (dqb->dqb_bsoftlimit && dqb->dqb_btime) {
if (dqb->dqb_btime > now) {
bover = 2;
} else {
if (dqb->dqb_ihardlimit &&
dqb->dqb_curinodes >= dqb->dqb_ihardlimit) {
iover = 1;
- } else if (dqb->dqb_isoftlimit &&
- dqb->dqb_curinodes >= dqb->dqb_isoftlimit) {
+ } else if (dqb->dqb_isoftlimit && dqb->dqb_itime) {
if (dqb->dqb_btime > now) {
iover = 2;
} else {