pre2.0.7 disk quota bug

Sergei Makarov smakarov at
Thu Feb 3 10:33:58 GMT 2000

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 2/2/00, 2:25:10 PM, <jeremy at> wrote regarding Re: 
pre2.0.7 disk quota bug:

> >
> > Hi all,
> >
> > SAMBA pre2.0.7
> > /configure --with-quotas
> > Linux 2.0.36
> > The old disk quota bug is still here. If user tries to write the file
> > to SAMBA share and disk quota is exceeded, SAMBA fills remaining space
> > within the target file with spaces, and writes it to the share. This
> > is "xcopy" behavior. If the program writes small chunks of file, the
> > result may differ. The user is under impression the file was written
> > successfully. While the file is heavily corrupted!
> >
> > Please, sort this out!

> It isn't Samba that is doing this, it is the client.

> The problem occurs because the client sets the file
> size before doing the writes. Under UNIX, this is allowable
> sa it creates a file full of "holes" (zeros) that takes no
> space, so the user has not gone over quota. When the client actually
> tries to fill the file with real data the user goes over quota and
> Samba returns an error. But the file size was set *before* the writes,
> so still seems correct.

> The only way to fix this would be to do an explicit user quota
> check on every file size change, which would be very expensive
> (read - *SLOW* !).

> Samba *is* returning the over quota error to the client.

> What tdo you execpt us to do here ?

Thanks for reply, Jeremy and for the hints. 
Since the problem is more complicated, than I expected - I didn't 
follow the code - I'll try to come up later with some real stuff - 
suggestions, proposals (code?).

Regards, Sergei.

More information about the samba mailing list