From: Amir Goldstein <amir73il@gmail.com>
To: Sargun Dhillon <sargun@sargun.me>
Cc: overlayfs <linux-unionfs@vger.kernel.org>,
Miklos Szeredi <miklos@szeredi.hu>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Giuseppe Scrivano <gscrivan@redhat.com>,
Vivek Goyal <vgoyal@redhat.com>,
Daniel J Walsh <dwalsh@redhat.com>,
David Howells <dhowells@redhat.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC PATCH 2/3] overlay: Add ovl_do_getxattr helper
Date: Mon, 16 Nov 2020 13:00:56 +0200 [thread overview]
Message-ID: <CAOQ4uxg6p1ip19U7+f2RR=k79Amzrzajc1yG3bvQ0qaiRWL5PA@mail.gmail.com> (raw)
In-Reply-To: <20201116045758.21774-3-sargun@sargun.me>
On Mon, Nov 16, 2020 at 6:58 AM Sargun Dhillon <sargun@sargun.me> wrote:
>
> We already have a helper for getting xattrs from inodes, namely
> ovl_getxattr, but it doesn't allow for copying xattrs onto the current
> stack. In addition, it is not instrumented like the rest of the helpers.
>
> Signed-off-by: Sargun Dhillon <sargun@sargun.me>
> Cc: linux-fsdevel@vger.kernel.org
> Cc: linux-unionfs@vger.kernel.org
> Cc: Miklos Szeredi <miklos@szeredi.hu>
> Cc: Amir Goldstein <amir73il@gmail.com>
> ---
> fs/overlayfs/overlayfs.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
> index 29bc1ec699e7..9eb911f243e1 100644
> --- a/fs/overlayfs/overlayfs.h
> +++ b/fs/overlayfs/overlayfs.h
> @@ -179,6 +179,15 @@ static inline int ovl_do_setxattr(struct dentry *dentry, const char *name,
> return err;
> }
>
> +static inline int ovl_do_getxattr(struct dentry *dentry, const char *name,
> + void *value, size_t size)
> +{
> + int err = vfs_getxattr(dentry, name, value, size);
> + pr_debug("getxattr(%pd2, \"%s\", \"%*pE\", %zu) = %i\n",
> + dentry, name, min((int)size, 48), value, size, err);
> + return err;
> +}
> +
upstream already has this helper.
> static inline int ovl_do_removexattr(struct dentry *dentry, const char *name)
> {
> int err = vfs_removexattr(dentry, name);
> --
> 2.25.1
>
next prev parent reply other threads:[~2020-11-16 12:32 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 4:57 [RFC PATCH 0/3] Make overlayfs volatile mounts reusable Sargun Dhillon
2020-11-16 4:57 ` [RFC PATCH 1/3] fs: Add s_instance_id field to superblock for unique identification Sargun Dhillon
2020-11-16 5:07 ` Sargun Dhillon
2020-11-16 4:57 ` [RFC PATCH 2/3] overlay: Add ovl_do_getxattr helper Sargun Dhillon
2020-11-16 11:00 ` Amir Goldstein [this message]
2020-11-16 4:57 ` [RFC PATCH 3/3] overlay: Add the ability to remount volatile directories when safe Sargun Dhillon
2020-11-16 9:31 ` Amir Goldstein
2020-11-16 10:30 ` Sargun Dhillon
2020-11-16 11:17 ` Amir Goldstein
2020-11-16 12:52 ` Amir Goldstein
2020-11-16 14:42 ` Vivek Goyal
2020-11-16 14:45 ` Vivek Goyal
2020-11-16 15:20 ` Amir Goldstein
2020-11-16 16:36 ` Vivek Goyal
2020-11-16 18:25 ` Sargun Dhillon
2020-11-16 19:27 ` Vivek Goyal
2020-11-16 20:18 ` Amir Goldstein
2020-11-16 21:09 ` Vivek Goyal
2020-11-17 5:33 ` Amir Goldstein
2020-11-17 14:48 ` Vivek Goyal
2020-11-17 15:24 ` Amir Goldstein
2020-11-17 15:40 ` Vivek Goyal
2020-11-17 16:46 ` Vivek Goyal
2020-11-17 18:03 ` Amir Goldstein
2020-11-17 18:29 ` Vivek Goyal
2020-11-18 7:24 ` Amir Goldstein
2020-11-18 8:27 ` Sargun Dhillon
2020-11-18 10:46 ` Amir Goldstein
2020-11-18 14:55 ` Vivek Goyal
2020-11-16 21:26 ` Vivek Goyal
2020-11-16 22:14 ` Sargun Dhillon
2020-11-17 5:41 ` Amir Goldstein
2020-11-17 17:05 ` Vivek Goyal
2020-11-16 17:38 ` Sargun Dhillon
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='CAOQ4uxg6p1ip19U7+f2RR=k79Amzrzajc1yG3bvQ0qaiRWL5PA@mail.gmail.com' \
--to=amir73il@gmail.com \
--cc=dhowells@redhat.com \
--cc=dwalsh@redhat.com \
--cc=gscrivan@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=sargun@sargun.me \
--cc=vgoyal@redhat.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;
as well as URLs for NNTP newsgroup(s).