Error during write operation when packets dropped in vfswrap_pwrite()

Richard Sharpe realrichardsharpe at gmail.com
Fri Jul 24 21:15:54 UTC 2015


On Fri, Jul 24, 2015 at 10:48 AM, sandeep nag
<sandeepnagamalli at gmail.com> wrote:
> To check the performance of samba, I am trying to drop packets in samba vfs
> write() entry function before writing to the disk.
> I have tried updating write function in vfs_default.c
>
> ssize_t vfswrap_pwrite((vfs_handle_struct *handle, files_struct *fsp, const
> void *data, size_t n)
> {
>   .
>   .
>  //result = SMB_VFS_WRITE(fsp, data, n);     <-- done this change
>  result =n;
>  return result;
> }

Try it with a smaller file and check with Wireshark. Windows probably
checks to see if the file size at the end is what it expects. Doing
what you did will likely cause the file size to remain at 0.

> Error seen on windows client :
> Writing 8594128896 binary bytes sequentially to Z:\file_10 (direct)
>   MS-DOS style path detected: Z:\file_10
> write error: No such file or directory.
> Also taking more time to finish the file copy.
>
>
> Apart from above change do I need to do any changes in reply message or any
> other place??
>
>
> Thanks,
> Sandeep



-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list