[2844] in Release_Engineering
quota patch
daemon@ATHENA.MIT.EDU (Richard Basch)
Fri May 29 15:32:04 1992
Date: Fri, 29 May 92 15:31:42 -0400
To: rel-eng@MIT.EDU
From: "Richard Basch" <basch@MIT.EDU>
The NFS-AFS committee desires warnings to be printed when the 90% mark
has been reached...
-Richard
*** /tmp/,RCSt1Q7oAc5 Fri May 29 15:31:00 1992
--- quota.1 Fri May 29 15:30:49 1992
***************
*** 19,25 ****
those filesystems that the user has attached and to which the user has
write access at the filesystem's top-level directory. Without any
options, \fIquota\fP displays warnings about those filesystems where
! usage is over quota.
.SH OPTIONS
--- 19,26 ----
those filesystems that the user has attached and to which the user has
write access at the filesystem's top-level directory. Without any
options, \fIquota\fP displays warnings about those filesystems where
! usage is over quota. With AFS filesystems, warnings are displayed when
! 90% of the volume's quota has been reached.
.SH OPTIONS
*** /tmp/,RCSt1Q7oHQL Fri May 29 15:31:01 1992
--- afs.c Fri May 29 15:24:14 1992
***************
*** 93,99 ****
vs->BlocksInUse,
vs->MaxQuota,
vs->MaxQuota,
! (vs->MaxQuota && (vs->BlocksInUse >= vs->MaxQuota)
? "<<" : ""));
}
}
--- 93,99 ----
vs->BlocksInUse,
vs->MaxQuota,
vs->MaxQuota,
! (vs->MaxQuota && (vs->BlocksInUse >= vs->MaxQuota * 9 / 10)
? "<<" : ""));
}
}
***************
*** 114,119 ****
--- 114,124 ----
if (vs->MaxQuota && (vs->BlocksInUse > vs->MaxQuota)) {
sprintf(buf,"User %s over disk quota on %s, remove %dK\n", name,
path, (vs->BlocksInUse - vs->MaxQuota));
+ putwarning(buf);
+ }
+ else if (vs->MaxQuota && (vs->BlocksInUse >= vs->MaxQuota * 9 / 10)) {
+ sprintf(buf,"User %s has used %d%% of his disk quota on %s\n", name,
+ (int)((vs->BlocksInUse*100.0/vs->MaxQuota)+0.5), path);
putwarning(buf);
}
}