Re: xattr names for unprivileged stacking?

Miklos Szeredi
2020-08-31T07:34:37Z

On Sun, Aug 30, 2020 at 9:10 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Sun, Aug 30, 2020 at 09:05:40PM +0200, Miklos Szeredi wrote:
> > Yes, open(..., O_ALT) would be special. Let's call it open_alt(2) to
> > avoid confusion with normal open on a normal filesystem. No special
> > casing anywhere at all. It's a completely new interface that returns
> > a file which either has ->read/write() or ->iterate() and which points
> > to an inode with empty i_ops.
>
> I think fiemap() should be allowed on a stream. After all, these extents
> do exist. But I'm opposed to allowing getdents(); it'll only encourage
> people to think they can have non-files as streams.

Call it whatever you want. I think getdents (without lseek!!!) is a
fine interface for enumeration.

Also let me stress again, that this ALT thing is not just about
streams, but a generic interface for getting OOB/meta/whatever data
for a given inode/path. Hence it must have a depth of at least 2, but
limiting it to 2 would again be shortsighted.

Thanks,
Miklos