Re: [PATCH v7 1/6] fuse: decouple fuse_ring creation from ent registration
Bernd Schubert <[email protected]>
| Newsgroups | dev.linux.lists.fuse-devel |
|---|---|
| Message-ID | <[email protected]> |
On 8/19/26 13:34, Miklos Szeredi wrote: > On Fri, 14 Aug 2026 at 21:00, Joanne Koong <[email protected]> wrote: >> >> Currently, the connection's fuse_ring is created lazily on the first >> FUSE_IO_URING_CMD_REGISTER command. A server registers entries from one >> thread per queue (one per CPU) and those threads issue their first >> REGISTER command concurrently. They then race to create the single >> per-connection fuse_ring, which required open-coded handling in >> fuse_uring_create() to detect and protect against concurrent creations. >> >> Decouple fuse_ring creation from ent registration and move it to >> FUSE_INIT reply processing after a server has negotiated and set >> FUSE_OVER_IO_URING. The ring is published before the connection is >> marked initialized. fuse_uring_register() no longer creates the ring and >> it instead uses the ring set up at init time. > > I tested this with loraw (a "raw" loopback tester that doesn't use > libfuse) and it fails with > > root@kvm:~# ./loraw -u /mnt/fuse > loraw: loraw.c:1010: lo_start_uring: Assertion `!cqe->res' failed. > > cqe->res is -22 (EINVAL). > > Attaching the reproducer. To compile: > > cp $(KERNEL_TREE)/include/uapi/linux/fuse.h fuse_kernel.h > gcc loraw.c -oloraw -luring Unless Joannes replies earlier, I will take a look in about 5 to 7 hours - reply expected in the night. Thanks, Bernd