A filter driver for implementing disk space quotas is described. Quota
limits on disk space taken up by files in the file system are established
for users and directories, and an internal database is established to
track quotas against actual disk space utilization. A driver in
accordance with the invention uses kernel resources of the operating
system to prevent execution of file system I/O operations which would
violate any established quota. In doing so, the driver executes a logic
in kernel mode which serializes file allocation operations and also
serializes access to the internal database. The first step in this logic
is to intercept file system I/O requests before they reach the file
system driver. Then the driver determines propectively--before the I/O
request is completed--whether any quota would be exceeded by completion
of the I/O request. If a quota would be exceeded, completion of the I/O
request is blocked and an error status is issued. It a quota would not be
exceeded, the I/O request is allowed to complete and the driver's
internal database is updated with revised disk space utilization data.