mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
To: Christian Brauner <brauner@kernel.org>
Cc: mszeredi@redhat.com, stgraber@stgraber.org,
	linux-fsdevel@vger.kernel.org, Seth Forshee <sforshee@kernel.org>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Amir Goldstein <amir73il@gmail.com>,
	Bernd Schubert <bschubert@ddn.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 4/9] fs/fuse: support idmapped getattr inode op
Date: Mon, 29 Jan 2024 16:42:40 +0100	[thread overview]
Message-ID: <20240129164240.9e35bcf01695efcb1f966517@canonical.com> (raw)
In-Reply-To: <20240120-heult-applaudieren-d6449392b497@brauner>

On Sat, 20 Jan 2024 16:21:08 +0100
Christian Brauner <brauner@kernel.org> wrote:

> >  int fuse_update_attributes(struct inode *inode, struct file *file, u32 mask)
> >  {
> > -	return fuse_update_get_attr(inode, file, NULL, mask, 0);
> > +	return fuse_update_get_attr(&nop_mnt_idmap, inode, file, NULL, mask, 0);
> >  }
> >  
> >  int fuse_reverse_inval_entry(struct fuse_conn *fc, u64 parent_nodeid,
> > @@ -1506,7 +1510,7 @@ static int fuse_perm_getattr(struct inode *inode, int mask)
> >  		return -ECHILD;
> >  
> >  	forget_all_cached_acls(inode);
> > -	return fuse_do_getattr(inode, NULL, NULL);
> > +	return fuse_do_getattr(&nop_mnt_idmap, inode, NULL, NULL);
> >  }
> >  
> >  /*
> > @@ -2062,7 +2066,7 @@ static int fuse_setattr(struct mnt_idmap *idmap, struct dentry *entry,
> >  			 * ia_mode calculation may have used stale i_mode.
> >  			 * Refresh and recalculate.
> >  			 */
> > -			ret = fuse_do_getattr(inode, NULL, file);
> > +			ret = fuse_do_getattr(&nop_mnt_idmap, inode, NULL, file);
> >  			if (ret)
> >  				return ret;
> 

Hi, Christian!

> These are internal getattr requests that don't originate from a specific mount?

These requests do originate from a specific mount, but we don't need an idmapping in there
because 3rd argument of fuse_do_getattr(struct mnt_idmap *idmap, struct inode *inode, struct kstat *stat, struct file *file) is NULL,
which means that this request will not fill an stat structure => we don't need to take an idmapping into account.

> Can you please add a comment about this in the commit message so it's
> clear why it's ok to not pass the idmapping?

Sure, that's my bad that I haven't added this explanation! It's not obvious at all.

Will be fixed in -v2.

Thanks,
Alex


  reply	other threads:[~2024-01-29 15:42 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08 12:08 [PATCH v1 0/9] fuse: basic support for idmapped mounts Alexander Mikhalitsyn
2024-01-08 12:08 ` [PATCH v1 1/9] fs/namespace: introduce fs_type->allow_idmap hook Alexander Mikhalitsyn
2024-01-08 12:08 ` [PATCH v1 2/9] fs/fuse: add FUSE_OWNER_UID_GID_EXT extension Alexander Mikhalitsyn
2024-03-05 14:38   ` Miklos Szeredi
2024-07-18 19:12     ` Aleksandr Mikhalitsyn
2024-08-29  8:24       ` Miklos Szeredi
2024-08-29 12:08         ` Christian Brauner
2024-08-29 12:17           ` Aleksandr Mikhalitsyn
2024-08-29 12:21             ` Aleksandr Mikhalitsyn
2024-08-29 12:29           ` Miklos Szeredi
2024-08-29 14:39             ` Aleksandr Mikhalitsyn
2024-08-29 15:04               ` Miklos Szeredi
2024-08-29 17:40                 ` Aleksandr Mikhalitsyn
2024-08-29 18:58                   ` Miklos Szeredi
2024-08-30 10:57                     ` Christian Brauner
2024-08-30 13:49                       ` Miklos Szeredi
2024-09-03 15:22                         ` Aleksandr Mikhalitsyn
2024-01-08 12:08 ` [PATCH v1 3/9] fs/fuse: support idmap for mkdir/mknod/symlink/create Alexander Mikhalitsyn
2024-01-08 12:08 ` [PATCH v1 4/9] fs/fuse: support idmapped getattr inode op Alexander Mikhalitsyn
2024-01-20 15:21   ` Christian Brauner
2024-01-29 15:42     ` Alexander Mikhalitsyn [this message]
2024-01-08 12:08 ` [PATCH v1 5/9] fs/fuse: support idmapped ->permission " Alexander Mikhalitsyn
2024-01-08 12:08 ` [PATCH v1 6/9] fs/fuse: support idmapped ->setattr op Alexander Mikhalitsyn
2024-01-20 15:23   ` Christian Brauner
2024-01-29 15:48     ` Alexander Mikhalitsyn
2024-01-30  9:52       ` Christian Brauner
2024-01-08 12:08 ` [PATCH v1 7/9] fs/fuse: drop idmap argument from __fuse_get_acl Alexander Mikhalitsyn
2024-01-20 15:24   ` Christian Brauner
2024-01-29 15:55     ` Alexander Mikhalitsyn
2024-01-08 12:08 ` [PATCH v1 8/9] fs/fuse: support idmapped ->set_acl Alexander Mikhalitsyn
2024-01-08 12:08 ` [PATCH v1 9/9] fs/fuse: allow idmapped mounts Alexander Mikhalitsyn
2024-01-21 17:50 ` [PATCH v1 0/9] fuse: basic support for " Christian Brauner
2024-01-22 21:13   ` Seth Forshee
2024-01-23 15:45     ` Christian Brauner
2024-01-29 16:52   ` Alexander Mikhalitsyn

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=20240129164240.9e35bcf01695efcb1f966517@canonical.com \
    --to=aleksandr.mikhalitsyn@canonical.com \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=bschubert@ddn.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mszeredi@redhat.com \
    --cc=sforshee@kernel.org \
    --cc=stgraber@stgraber.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

all inboxes | Powered by JetHome®