FAT, NTFS, CIFS and DOS attributes

Jeremy Allison jra at samba.org
Thu Jan 6 17:48:12 GMT 2005


On Thu, Jan 06, 2005 at 11:32:28PM +1100, Andrew Tridgell wrote:
> 
> In Samba3 what we do is just succeed the FSCTL_SET_SPARSE ntioctl, but
> not actually do anything. We also pretend to succeed ALLOCATION_INFO
> calls, and using END_OF_FILE_INFO beyond the end of file just uses
> ftruncate(), which (incorrectly in most cases) leaves it sparse.

Actually, we do have a parameter "strict allocate" which will zero
fill a file on extending with ftruncate. You didn't add it so I'm
not suprised you're not aware of it :-).

> What I'd really like is for some way to tell a unix filesystem not to
> make a file sparse, so that we can implement NTFS semantics correctly
> for applications that rely on it. I'd like to do this without having
> to actually call pwrite() with lots of zeros.

Yep - write with zeros is what we do now :-).

Jeremy.


More information about the samba-technical mailing list