From: Dave Chinner <david@fromorbit.com>
To: Trond Myklebust <trondmy@hammerspace.com>
Cc: "miklos@szeredi.hu" <miklos@szeredi.hu>,
"raven@themaw.net" <raven@themaw.net>,
"kzak@redhat.com" <kzak@redhat.com>,
"dhowells@redhat.com" <dhowells@redhat.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-security-module@vger.kernel.org"
<linux-security-module@vger.kernel.org>,
"mszeredi@redhat.com" <mszeredi@redhat.com>,
"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"linux-man@vger.kernel.org" <linux-man@vger.kernel.org>,
"amir73il@gmail.com" <amir73il@gmail.com>,
"christian@brauner.io" <christian@brauner.io>,
"James.Bottomley@hansenpartnership.com"
<James.Bottomley@hansenpartnership.com>
Subject: Re: [RFC PATCH] getvalues(2) prototype
Date: Mon, 28 Mar 2022 08:03:19 +1100 [thread overview]
Message-ID: <20220327210319.GM1609613@dread.disaster.area> (raw)
In-Reply-To: <5d5c170949a5c4e2e4b8ef8949e5cdc5110eeabf.camel@hammerspace.com>
On Fri, Mar 25, 2022 at 04:42:27PM +0000, Trond Myklebust wrote:
> On Fri, 2022-03-25 at 07:31 +1100, Dave Chinner wrote:
> > > and anyway the point of a
> > > hierarchical namespace is to be able to list nodes on each level.
> > > We
> > > can use getxattr() for this purpose, just like getvalues() does in
> > > the
> > > above example.
> >
> > Yup, and like Casey suggests, you could implement a generic
> > getvalues()-like user library on top of it so users don't even need
> > to know where and how the values are located or retrieved.
> >
> > The other advantage of an xattr interface is that is also provides a
> > symmetrical API for -changing- values. No need for some special
> > configfs or configfd thingy for setting parameters - just change the
> > value of the parameter or mount option with a simple setxattr call.
> > That retains the simplicity of proc and sysfs attributes in that you
> > can change them just by writing a new value to the file....
>
> The downsides are, however, that the current interface provides little
> in the way of atomicity if you want to read or write to multiple
> attributes at the same time. Something like a backup program might want
> to be able to atomically retrieve the ctime when it is backing up the
> attributes.
I assumed that batched updates were implied and understood after
my earlier comments about XFS_IOC_ATTRMULTI_BY_HANDLE as used
by xfsdump/restore for the past 20+ years.
> Also, when setting attributes, I'd like to avoid multiple syscalls when
> I'm changing multiple related attributes.
>
> IOW: Adding a batching interface that is akin to what Miklos was
> proposing would be a helpful change if we want to go down this path.
Yup, that's exactly what XFS_IOC_ATTRMULTI_BY_HANDLE provides and
I'm assuming that would also be provided by whatever formalised
generic syscall API we come up with here...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2022-03-27 21:03 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 19:27 [RFC PATCH] getvalues(2) prototype Miklos Szeredi
2022-03-22 19:30 ` Miklos Szeredi
2022-03-22 20:36 ` Casey Schaufler
2022-03-22 20:53 ` Casey Schaufler
2022-03-23 7:14 ` Greg KH
2022-03-23 7:16 ` Greg KH
2022-03-23 10:26 ` Bernd Schubert
2022-03-23 11:42 ` Greg KH
2022-03-23 12:06 ` Bernd Schubert
2022-03-23 12:13 ` Greg KH
2022-03-23 19:29 ` J. Bruce Fields
2022-03-23 11:42 ` Christian Brauner
2022-03-23 13:24 ` Miklos Szeredi
2022-03-23 13:38 ` Greg KH
2022-03-23 15:23 ` Miklos Szeredi
2022-03-24 6:56 ` Greg KH
2022-03-23 13:51 ` Casey Schaufler
2022-03-23 14:00 ` Miklos Szeredi
2022-03-23 22:39 ` Casey Schaufler
2022-03-23 22:19 ` Theodore Ts'o
2022-03-24 6:34 ` Christoph Hellwig
2022-03-24 8:44 ` Miklos Szeredi
2022-03-24 16:15 ` Eric W. Biederman
2022-03-25 8:46 ` Karel Zak
2022-03-25 8:54 ` Greg KH
2022-03-25 9:25 ` Karel Zak
2022-03-26 4:19 ` Theodore Ts'o
2022-03-25 18:40 ` Linus Torvalds
2022-03-25 11:02 ` Cyril Hrubis
2022-03-23 22:58 ` Dave Chinner
2022-03-23 23:17 ` Casey Schaufler
2022-03-24 8:57 ` Miklos Szeredi
2022-03-24 10:34 ` Amir Goldstein
2022-03-24 20:31 ` Dave Chinner
2022-03-25 9:10 ` Karel Zak
2022-03-25 16:42 ` Trond Myklebust
2022-03-27 21:03 ` Dave Chinner [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=20220327210319.GM1609613@dread.disaster.area \
--to=david@fromorbit.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=amir73il@gmail.com \
--cc=christian@brauner.io \
--cc=dhowells@redhat.com \
--cc=kzak@redhat.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@redhat.com \
--cc=raven@themaw.net \
--cc=torvalds@linux-foundation.org \
--cc=trondmy@hammerspace.com \
--cc=viro@zeniv.linux.org.uk \
/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