[Samba] Re: vfat / ftruncate problem

Tom Schaefer tom at umsl.edu
Fri Apr 11 14:44:40 GMT 2003


I kept fighting with it and came up with a solution.  (I think)

My analysis in the previous posting was somewhat flawed.  It isn't that the ftruncate command to the vfat partition is taking to long to fail.  Its that after its failed the workaround implemented by Samba is taking to long.

I modified the the source code of vfs-wrap.c, in particular this section:
 
result = sys_ftruncate(fd, len);
        if (result == 0)
                goto done;

to 

/*result = sys_ftruncate(fd, len);
        if (result == 0)*/
result = 0;
                goto done;

recompiled smbd, put the new binary in place, restarted samba and lo and behold it worked!  Now I can copy my 750Meg test file from Windows98SE Windows Explorer to a samba shared vfat partition and the copy starts immediately and completes successfully after a minute or two.

So, now my question is - What kind of problem(s) if any am I setting myself up for by doing this?

Thankyou,
Tom Schaefer


More information about the samba mailing list