On 11/4/24 09:24, Bernd Schubert wrote: > Hi David, > > On 10/23/24 00:10, David Wei wrote: >> [You don't often get email from dw@xxxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] >> >> On 2024-10-15 17:05, Bernd Schubert wrote: >>> RFCv1 and RFCv2 have been tested with multiple xfstest runs in a VM >>> (32 cores) with a kernel that has several debug options >>> enabled (like KASAN and MSAN). RFCv3 is not that well tested yet. >>> O_DIRECT is currently not working well with /dev/fuse and >>> also these patches, a patch has been submitted to fix that (although >>> the approach is refused) >>> https://www.spinics.net/lists/linux-fsdevel/msg280028.html >> >> Hi Bernd, I applied this patch and the associated libfuse patch at: >> >> https://github.com/bsbernd/libfuse/tree/aligned-writes >> >> I have a simple Python FUSE client that is still returning EINVAL for >> write(): >> >> with open(sys.argv[1], 'r+b') as f: >> mmapped_file = mmap.mmap(f.fileno(), 0) >> shm = shared_memory.SharedMemory(create=True, size=mmapped_file.size()) >> shm.buf[:mmapped_file.size()] = mmapped_file[:] >> fd = os.open("/home/vmuser/scratch/dest/out", O_RDWR|O_CREAT|O_DIRECT) >> with open(fd, 'w+b') as f2: >> f2.write(bytes(shm.buf)) >> mmapped_file.close() >> shm.unlink() >> shm.close() >> >> I'll keep looking at this but letting you know in case it's something >> obvious again. > > the 'aligned-writes' libfuse branch would need another kernel patch. Please > hold on a little bit, I hope to send out a new version later today or > tomorrow that separates headers from payload - alignment is guaranteed. > If you are very brave, you could try out this (sorry, still on 6.10) https://github.com/bsbernd/linux/tree/fuse-uring-for-6.10-rfc5 https://github.com/bsbernd/libfuse/tree/uring Right now #fuse-uring-for-6.10-rfc5 is rather similar to fuse-uring-for-6.10-rfc4, with two additional patches to separate headers from payload. The head commit, which updates fuse-io-uring is going to be rebased into the other commits tomorrow. Also, I just noticed a tear down issue, when the daemon is killed while IO is going on - busy inodes on sb shutdown. Some fuse requests are probably not correctly released, I guess that is also already present on rfcv4. Will look into it in the morning. Thanks, Bernd