[Samba] Re: vfat / ftruncate problem
Gerald (Jerry) Carter
jerry at samba.org
Fri Apr 11 15:29:16 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, 11 Apr 2003, Tom Schaefer wrote:
> 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?
Probably a lot of headaches. You have crippled the all ftruncate()
support in smbd. If a client tries to set the size on a file, it
will fail. Whether the client will care of it, is another matter.
Just be prepared for strange errors.
cheers, jerry
----------------------------------------------------------------------
Hewlett-Packard ------------------------- http://www.hp.com
SAMBA Team ---------------------- http://www.samba.org
GnuPG Key ---- http://www.plainjoe.org/gpg_public.asc
"You can never go home again, Oatman, but I guess you can shop there."
--John Cusack - "Grosse Point Blank" (1997)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/
iD8DBQE+lt9MIR7qMdg1EfYRAjDRAKCuXBvBEbHaAluzP3TLIYbtEa4G7ACg0Eet
P0tkyoDPnlwHjSoDOrWgy9U=
=Cxxt
-----END PGP SIGNATURE-----
More information about the samba
mailing list