Re: Clarification of statx->attributes_mask meaning?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 1, 2020 at 4:42 PM Theodore Y. Ts'o <tytso@xxxxxxx> wrote:
>
> On Mon, Nov 30, 2020 at 09:37:29PM -0600, Eric Sandeen wrote:
> > > We should be really clear how applications are supposed to use the
> > > attributes_mask.  Does it mean that they will always be able to set a
> > > flag which is set in the attribute mask?  That can't be right, since
> > > there will be a number of flags that may have some more complex checks
> > > (you must be root, or the file must be zero length, etc.)  I'm a bit
> > > unclear about what are the useful ways in which an attribute_mask can
> > > be used by a userspace application --- and under what circumstances
> > > might an application be depending on the semantics of attribute_mask,
> > > so we don't accidentally give them an opportunity to complain and
> > > whine, thus opening ourselves to another O_PONIES controversy.
> >
> > Hah, indeed.
> >
> > Sorry if I've over-complicated this, I'm honestly just confused now.
>
> Yeah, I'm honestly confused too how applications can use the
> attributes mask, too.

If the meaning is "the flags value is valid" then the use case would be:

 - look in mask if set, if yes, then can use the corresponding flag

 - if mask is not set, then ignore flag, and try to find out the value
of the property some other (possibly more expensive) way.

For STATX_ATTR_DAX it makes sense, since the value can be determined
in alternative ways on old kernels, so application can fall back if
DAX is not in the mask.

As noted upthread any other use would be ambiguous.

Thanks,
Miklos



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux