Rupesh Kumar
2008-Jun-11 08:19 UTC
[Samba] vfs_set_filelen function problem on FAT file systems.
Hi All, I am facing problem when copying large files from Windows PC to FAT Partition. I observed that the vfs_set_filelen() (SMB_VFS_FTRUNCATE) call is actually creating the Zero file on the FAT Partition which is taking lot of time and the connection is getting closed. What is the merit of setting the file size before starting the copy. Anyway this will create a sparse file on unix file system.(Which will not even allocate data blocks on the Disk) After commenting the SMB_VFS_FTRUNCATE and reporting to the vfs_set_filelen() caller as success my problem got solved and I am able to copy big files on to the disk. What are your views on reporting vfs_set_filelen as success without truncating the file to the size requested. Does this have any side effects. Regards Rupesh Kumar
Volker Lendecke
2008-Jun-11 08:22 UTC
[Samba] Re: vfs_set_filelen function problem on FAT file systems.
On Wed, Jun 11, 2008 at 01:42:27PM +0530, Rupesh Kumar wrote:> What are your views on reporting vfs_set_filelen as success without > truncating the file to the size requested. Does this have any side effects.Yes, it does. We can not report the correct file size that Windows clients expect anyore. This will break a lot of applications. There is currently work underway to make calls to ftruncate and friends async, so that at least clients will not reconnect if that call takes more than 30 seconds. Will take a while thought before this hits a release. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20080611/dc88141f/attachment-0003.bin
Rupesh Kumar
2008-Jun-11 09:27 UTC
[Samba] Re: vfs_set_filelen function problem on FAT file systems.
On Wed, Jun 11, 2008 at 1:53 PM, Volker Lendecke <Volker.Lendecke@sernet.de> wrote:> On Wed, Jun 11, 2008 at 01:42:27PM +0530, Rupesh Kumar wrote: > > What are your views on reporting vfs_set_filelen as success without > > truncating the file to the size requested. Does this have any side > effects. > > Yes, it does. We can not report the correct file size that > Windows clients expect anyore. This will break a lot of > applications.I understand that we cant report the correct size while copying. But what kind of applications can ask for the file size while copying. Regards Rupesh Kumar