[Samba] io_uring cause data corruption

A L mail at lechevalier.se
Fri May 1 19:27:58 UTC 2020


On 2020-05-01 18:45, Jeremy Allison via samba wrote:
> On Fri, May 01, 2020 at 05:07:17PM +0200, A L via samba wrote:
>> On 2020-05-01 15:59, Rowland penny via samba wrote:
>>> On 01/05/2020 14:35, A L via samba wrote:
>>>> True.. I just copied from another share. Would that have a impact on
>>>> the current problem with io_uring?
>>> I do not know, I'll leave that up to Jeremy, but it has to be worth
>>> trying without the lines.
>>>
>>> Rowland
>>>
>> I removed the unnecessary entries and also removed the btrfs vfs module.
>> Also tested to move the file from the USB disk to an internal SSD disk, but
>> unfortunately, the same corruptions still happen.
>>
>> ########
>> [share_io_uring]
>>      comment = USB Backup - Media files
>>      path = /media/usb-backup
>>      browseable = yes
>>      read only = yes
>>      guest only = Yes
>>      guest ok = Yes
>>      vfs objects =  io_uring
>>
>> [share_no_io_uring]
>>      comment = USB Backup - Media files
>>      path = /media/usb-backup
>>      browseable = yes
>>      read only = yes
>>      guest only = Yes
>>      guest ok = Yes
>>      vfs objects =
>> ########
> OK, I'm going to try and reproduce with a Windows 10 client
> against Samba master.
>
> Can you give me the *exact* Windows command line you're
> using to do the copy please, with the smallest set of
> file generation/size I'd need to reproduce (i.e. if it
> always happens with just one file I don't want to have
> to creat 1000 100GB files :-).
>
> Thanks !
>
> Jeremy.
I did not use a command line, but rather File Explorer
1) In File explorer, go to \\SAMBA\share_io_uring\
2) Select folder "test2-ro" and choose copy
3) Paste to a local drive

The amount of files not working seems to vary, but usually within the 10 
first copied files. You can download a copy of the source test files 
from https://mirrors.tnonline.net/?dir=samba including all checksums.

The file https://mirrors.tnonline.net/samba/test2-ro_no_io_uring.7z 
contains 1000 copies of the source file
The file https://mirrors.tnonline.net/samba/test2-ro_with_io_uring.7z 
contains the same files as they ended up after copying to the Windows 
client. Here you can see where the holes (bunch of zeroed data) in the 
files are created at different offsets.

I hope this helps!

Regards,
Anders



More information about the samba mailing list