Linux NFS development
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Cedric Blancher <cedric.blancher@gmail.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: How to set the NFSv4 "HIDDEN" attribute on Linux?
Date: Fri, 24 Nov 2023 12:30:47 -0500	[thread overview]
Message-ID: <ZWDdxz+1LWR3FClw@tissot.1015granger.net> (raw)
In-Reply-To: <CALXu0Uf9LiNL7SA57vSq5pMBVBZESWexcRwDR0XMc9fFpPiNkQ@mail.gmail.com>

On Wed, Nov 22, 2023 at 11:42:43PM +0100, Cedric Blancher wrote:
> On Mon, 20 Nov 2023 at 12:46, Jeff Layton <jlayton@kernel.org> wrote:
> >
> > On Sun, 2023-11-19 at 17:51 +0100, Cedric Blancher wrote:
> > > On Sat, 18 Nov 2023 at 12:56, Jeff Layton <jlayton@kernel.org> wrote:
> > > >
> > > > On Sat, 2023-11-18 at 07:24 +0100, Cedric Blancher wrote:
> > > > > Good morning!
> > > > >
> > > > > NFSv4 has a "hidden" filesystem object attribute. How can I set that
> > > > > on a Linux NFSv4 server, or in a filesystem exported on Linux via
> > > > > NFSv4, so that the NFSv4 client gets this attribute for a file?
> > > > >
> > > >
> > > > You can't. RFC 8881 defines that as "TRUE, if the file is considered
> > > > hidden with respect to the Windows API." There is no analogous Linux
> > > > inode attribute.
> > >
> > > Can we use setfattr and getfattr to set/get the NFSv4.1 HIDDEN and
> > > ARCHIVE? We have Windows NFSv4 clients (and kofemann/Roland's codebase
> > > supports this), and that means we need to be able to set/get and
> > > backup/restore these flags on the NFSv4 server side.
> > >
> >
> > No. They would need to be stored in the inode on the server somehow and
> > there is no place to store them. These attributes are simply not
> > supported by the Linux NFS server.
> 
> Linux has xattrs, which are per inode, and can be backuped and
> restored via tar --xattrs. That would be good enough

This being upstream, we are more concerned with a properly
architected long-term solution rather than a proof of concept.

If Linux were to support them, I would rather see these treated as
first-class file attributes -- such attributes might be used by
Samba, the SMB client, and local accessors as well as NFSD, so they
would need a common and consistent API, through the VFS.

Since they are not POSIX attributes, I think they would have to be
plumbed through statx(), and each file system would need to
determine their own mechanism for storing them. The VFS API would
also need to indicate whether the file system supports them at all.

Again, this is not as easy as just stuffing these things into an
xattr and all of the above is outside the purview of NFSD. As we
don't have any Linux-native application use cases, I can't see
implementing support for them as a priority. But as always, patches
are welcome.


-- 
Chuck Lever

      parent reply	other threads:[~2023-11-24 17:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-18  6:24 How to set the NFSv4 "HIDDEN" attribute on Linux? Cedric Blancher
2023-11-18 11:56 ` Jeff Layton
2023-11-19 16:51   ` Cedric Blancher
2023-11-20 11:46     ` Jeff Layton
2023-11-20 14:44       ` Chuck Lever III
2023-11-22 22:41         ` Cedric Blancher
2023-11-22 22:42       ` Cedric Blancher
2023-11-23 22:24         ` <DOT>foo gets NFSv4 HIDDEN attribute by default by nfsd? " Cedric Blancher
2023-11-23 22:46           ` Rick Macklem
2023-11-24 17:43           ` Chuck Lever
2023-11-25 14:52             ` Jeff Layton
2023-11-26 17:08               ` Chuck Lever
2023-11-27 13:33                 ` Jeff Layton
2023-11-30 10:28               ` Cedric Blancher
2023-11-30 14:17                 ` Jeff Layton
2023-11-24 17:30         ` Chuck Lever [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZWDdxz+1LWR3FClw@tissot.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=cedric.blancher@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox