More on quotas

Jim McDonough jmcd at us.ibm.com
Wed Mar 28 18:12:35 GMT 2001


An interesting bit about quotas...and this is with samba quota support
enabled on 2.2

Trying to do a copy that exceeds the quota on Win98 behaves this way
(netmon trace greatly simplified):

Find the old file
See if the new file exists
open the old file
create the new file
while not finished {
  read the old file
  write the new file : breaks on hard error 39
}
close the old file
close the new file
delete the new file

So the client takes care of deleting the old file when the "disk filled
up".


On Win2K and NT:
Find the old file
See if the new file exists
open the old file
create the new file
set the new file size (transact2 set file info)
while not finished {
  read the old file
  write the new file : breaks on hard error 39
}
close the old file
close the new file

NT and 2K do not take care of deleting the old file.  If the server is NT
instead of samba, it issues a zero-byte write at the end of the file to
test if there is enough room.  This fails, and then it uses a trans2 set
file info to cause a delete on close.

So while the patch I submitted isn't complete or correct, it does point out
a problem with quota support.  The same result happens from an NT/2k client
whether or not samba quota support is built.

Jim




----------------------------
Jim McDonough
Linux Technology Center
IBM Boulder

Notes: Jim McDonough/Boulder/IBM @ IBMUS
VNET: JMCD at IBMUSM54
Internet: jmcd at us.ibm.com

Phone: (303) 924-5822
T/L: 263-5822





More information about the samba-technical mailing list