On Sun, 2024-12-22 at 11:12 +0100, Christian Brauner wrote: > > Do the fs people have a preference? The cursor mark is simpler to > > implement but depends on internal libfs.c magic. The actor hijack > > is at least something that already exists, so would be less prone > > to breaking due to internal changes. > > I think making this filesystem specific is better than plumbing this > into dcache_readdir(). Neither would require changes to libfs.c: the dcache_readdir already does the ignore cursor behaviour; the code in efivarfs would just set the cursor flag to take advantage of it. However, on further consideration I think making the zero size entries not show up in the directory listing doesn't really help anything: they still have to be found on lookup (otherwise nothing mediates a same variable create race) which means an open by name from userspace will still get hold of one. The good news is that after this change they should only show up fleetingly instead of hanging around until the next reboot, so the chances of anyone hitting a problem is much smaller. Regards, James