[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJnrk1b+0B5h4A4=5zRJ04Kdw-OxbGW_m9s+5U=HZpw+q1umqg@mail.gmail.com>
Date: Mon, 3 Nov 2025 10:43:10 -0800
From: Joanne Koong <joannelkoong@...il.com>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: miklos@...redi.hu, bernd@...ernd.com, neal@...pa.dev,
linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 3/5] fuse: implement file attributes mask for statx
On Mon, Nov 3, 2025 at 10:30 AM Joanne Koong <joannelkoong@...il.com> wrote:
>
> > diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
> > index a8068bee90af57..8c47d103c8ffa6 100644
> > --- a/fs/fuse/fuse_i.h
> > +++ b/fs/fuse/fuse_i.h
> > @@ -140,6 +140,10 @@ struct fuse_inode {
> > /** Version of last attribute change */
> > u64 attr_version;
> >
> > + /** statx file attributes */
> > + u64 statx_attributes;
> > + u64 statx_attributes_mask;
> > +
> > union {
> > /* read/write io cache (regular file only) */
> > struct {
> > @@ -1235,6 +1239,39 @@ void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr,
> > u64 attr_valid, u32 cache_mask,
> > u64 evict_ctr);
> >
> > +/*
> > + * These statx attribute flags are set by the VFS so mask them out of replies
> > + * from the fuse server for local filesystems. Nonlocal filesystems are
> > + * responsible for enforcing and advertising these flags themselves.
> > + */
> > +#define FUSE_STATX_LOCAL_VFS_ATTRIBUTES (STATX_ATTR_IMMUTABLE | \
> > + STATX_ATTR_APPEND)
>
> for STATX_ATTR_IMMUTABLE and STATX_ATTR_APPEND, I see in
> generic_fill_statx_attr() that they get set if the inode has the
> S_IMMUTABLE flag and the S_APPEND flag set, but I'm not seeing how
> this is relevant to fuse. I'm not seeing anywhere in the vfs layer
> that sets S_APPEND or STATX_ATTR_IMMUTABLE, I only see specific
> filesystems setting them, which fuse doesn't do. Is there something
> I'm missing?
Ok, I see. In patchset 6/8 patch 3/9 [1],
FUSE_ATTR_SYNC/FUSE_ATTR_IMMUTABLE/FUSE_ATTR_APPEND flags get added
which signify that S_SYNC/S_IMMUTABLE/S_APPEND should get set on the
inode. Hmm I'm confused why we would want to mask them out for local
filesystems. If FUSE_ATTR_SYNC/FUSE_ATTR_IMMUTABLE/FUSE_ATTR_APPEND
are getting passed in by the fuse server and getting enforced, why
don't we want them to show up in stax?
Thanks,
Joanne
[1] https://lore.kernel.org/linux-fsdevel/176169811656.1426244.11474449087922753694.stgit@frogsfrogsfrogs/
>
> Thanks,
> Joanne
Powered by blists - more mailing lists