On Thu, 29 Feb 2024 at 11:17, Christian Brauner <brauner@xxxxxxxxxx> wrote: > > On Thu, Feb 29, 2024 at 11:15:35AM +0100, Christian Brauner wrote: > > On Wed, Feb 28, 2024 at 04:01:17PM +0100, Miklos Szeredi wrote: > > > On Wed, 28 Feb 2024 at 15:32, Jens Axboe <axboe@xxxxxxxxx> wrote: > > > > > > > > On 2/28/24 4:28 AM, Amir Goldstein wrote: > > > > > > > > Are fixed files visible to lsof? > > > > > > > > lsof won't show them, but you can read the fdinfo of the io_uring fd to > > > > see them. Would probably be possible to make lsof find and show them > > > > too, but haven't looked into that. > > > > I actually wrote about this before when I suggested IORING_OP_FIXED_FD_INSTALL: > > https://patchwork.kernel.org/project/io-uring/patch/df0e24ff-f3a0-4818-8282-2a4e03b7b5a6@xxxxxxxxx/#25629935 > > I think that it shouldn't be a problem as long as userspace has some way > of figuring this out. So extending lsof might just be enough for this. Problem is fdinfo on io_uring fd just contains the last component names. Do we want full "magic symlink" semantics for these? I'm not sure. But just the last component does seem too little. I've advocated using xattr for querying virtual attributes like these. So I'll advocate again. Does anyone see a problem with adding getxattr("/proc/$PID/fdinfo/$IO_URING_FD", "io_uring:fixed_files:$SLOT:path", buf, buflen); ? Thanks, Miklos