Re: [PATCH 08/10] fs: port higher-level mapping helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 23, 2021 at 3:29 PM Christian Brauner <brauner@xxxxxxxxxx> wrote:
>
> From: Christian Brauner <christian.brauner@xxxxxxxxxx>
>
> Enable the mapped_fs{g,u}id() helpers to support filesystems mounted
> with an idmapping. Apart from core mapping helpers that use
> mapped_fs{g,u}id() to initialize struct inode's i_{g,u}id fields xfs is
> the only place that uses these low-level helpers directly.
>
> The patch only extends the helpers to be able to take the filesystem
> idmapping into account. Since we don't actually yet pass the
> filesystem's idmapping in no functional changes happen. This will happen
> in a final patch.
>
> Cc: Seth Forshee <sforshee@xxxxxxxxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> CC: linux-fsdevel@xxxxxxxxxxxxxxx
> Signed-off-by: Christian Brauner <christian.brauner@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_inode.c          | 10 ++++++----
>  fs/xfs/xfs_symlink.c        |  5 +++--
>  include/linux/fs.h          |  8 ++++----
>  include/linux/mnt_mapping.h | 12 ++++++++----
>  4 files changed, 21 insertions(+), 14 deletions(-)
>
> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
> index 64b9bf334806..7ac8247b5498 100644
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -977,6 +977,7 @@ xfs_create(
>         struct xfs_trans_res    *tres;
>         uint                    resblks;
>         xfs_ino_t               ino;
> +       struct user_namespace   *fs_userns = &init_user_ns;
>
>         trace_xfs_create(dp, name);
>
> @@ -988,8 +989,8 @@ xfs_create(
>         /*
>          * Make sure that we have allocated dquot(s) on disk.
>          */
> -       error = xfs_qm_vop_dqalloc(dp, mapped_fsuid(mnt_userns),
> -                       mapped_fsgid(mnt_userns), prid,
> +       error = xfs_qm_vop_dqalloc(dp, mapped_fsuid(mnt_userns, fs_userns),
> +                       mapped_fsgid(mnt_userns, fs_userns), prid,

I am confused.
Do we intend to enable idmapped xfs sb?
If the answer is yes, then feel free to add:

Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx>

I did a quick review pass of all the patches.
The ones I did not reply to I felt I needed to take a close look
so will continue with the review later.

Thanks,
Amir.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux