linux (but not samba) quotas

David Collier-Brown davecb at canada.sun.com
Wed Mar 28 22:00:38 GMT 2001


Jeremy Allison wrote:
> Under POSIX, seeking past the end of a file and doing a one
> byte write creates a "holey" file, whose size is reported as
> the seek size + 1. Under NT, this actually reserves the data
> space needed on disk.
> 
> The only way to fix this under Samba POSIX is to force writes of
> zero bytes in the intermediate space when extending a file.
> That way, out of space errors can be reported at the time NT
> expects to see them.

	I've been thinking about this for some time,
	and wonder, from the ongoing discussion,
	if we could contrive to get the Windows
	client to 
	a) fail on the write past the end IFF out of space/quota, or
	b) feel that it's constrained to write the file
            sequentially.

	(A) might be achieved by detecting that it's
	  an explicit extend-file operation or a 
	  write at a location > (size + amount to be written)
	  and then seeing if it is about to exceed the
	  quote.  Note that this assumes the quota/space
	  check is inherently cheap.

	(B) would be black magic (;-))

--dave
-- 
David Collier-Brown,           | Always do right. This will gratify 
Performance & Engineering Team | some people and astonish the rest.
Americas Customer Engineering  |                      -- Mark Twain
(905) 415-2849                 | davecb at canada.sun.com




More information about the samba-technical mailing list