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.
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
On Fri, May 01, 2020 at 09:27:58PM +0200, A L via samba wrote:> > 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!OK, I just did this locally with 100 10MB duplicate files. Completely correct SHA256 output for every file on both Windows and Linux after the copy. Note that these are *separate* files on ext4, not created with --reflink (ext4 doesn't support it). The Windows client first tries to do the FSCTL_OFFLOAD_READ (which our btrfs module does support, but not the default ext4 module) and then falls back to regular SMB2 async read, ramping up from 32k initially to 1MB reads. I'm starting to think the problem is in your btrfs filesystem, not the Samba uring module. Before I spend more time on this I'd like you to create a standard ext4 filesystem, create all the files with cp *without* using reflink (which ext4 doesn't support) so we know there's no COW shenanigans and then copy from *that* filesystem to the Windows client using the iouring module. I'm not a betting man, but if I was I'd bet the problem dissapears :-).