[Samba] Samba Problem With Big File Transfer on Windows Client

Aravinda Guzzar aguzzar at gmail.com
Wed Jul 4 19:28:15 GMT 2007


>>>problem when we try to transfer a big file (~100 MB) from the client
>>>(Windows) to the server (embedded linux).

I had encountered a similar while copying the larger file from client to
server. I had figured out that this causes due to failure in extending the
file using ftruncate call.

While copying a file from client to the server, server first extends the
file up to the file size by executing the ftruncate() and writes 0 to the
extended area. If the file is huge say in your case 100MB the client times
out by the time ftruncate returns after extending the file.

The code this happens in samba is in below module:

/smbd/vfs-wrap.c

int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd,
SMB_OFF_T len)
{

...
 result = sys_ftruncate(fd, len);

....

}

To confirm whether this is the problem you can write a small program to see
whether ftruncate is taking a lot of time. Also you can capture packets and
see where exactly the problem is?

HTH

Aravind


More information about the samba mailing list