All of lore.kernel.org
 help / color / mirror / Atom feed
* Supporting idmapped mounts
@ 2021-04-30 13:25 Christian Brauner
  2021-04-30 13:43 ` David Sterba
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Brauner @ 2021-04-30 13:25 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Aleksa Sarai

Hey everyone,

Userspace seems to already be catching up with idmapped mount support.
Systemd has started making use of it in their container manager and is
in the process of expanding useage throughout their codebase (cf. [1]).
One of the first requests obviously was "When can we get btrfs"? So I
was thinking about starting to work on patches for btrfs to support
them. Would you be interested in this if we implement it? I'm preparing
the necessary vfs changes currently. I already added a comprehensive
generic test-suite to xfstests which would then also cover btrfs as
well.

Thanks!
Christian

[1]: https://github.com/systemd/systemd/pull/19438#discussion_r622807165

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Supporting idmapped mounts
  2021-04-30 13:25 Supporting idmapped mounts Christian Brauner
@ 2021-04-30 13:43 ` David Sterba
  2021-04-30 14:44   ` Christian Brauner
  0 siblings, 1 reply; 3+ messages in thread
From: David Sterba @ 2021-04-30 13:43 UTC (permalink / raw)
  To: Christian Brauner; +Cc: linux-btrfs, Aleksa Sarai

On Fri, Apr 30, 2021 at 03:25:17PM +0200, Christian Brauner wrote:
> Hey everyone,
> 
> Userspace seems to already be catching up with idmapped mount support.
> Systemd has started making use of it in their container manager and is
> in the process of expanding useage throughout their codebase (cf. [1]).
> One of the first requests obviously was "When can we get btrfs"? So I
> was thinking about starting to work on patches for btrfs to support
> them. Would you be interested in this if we implement it?

Yes of course, for feature parity.

> I'm preparing
> the necessary vfs changes currently. I already added a comprehensive
> generic test-suite to xfstests which would then also cover btrfs as
> well.

Great, thanks.  Does it needs vfs changes or is it just updating the
btrfs callbacks to pass the right namespace?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Supporting idmapped mounts
  2021-04-30 13:43 ` David Sterba
@ 2021-04-30 14:44   ` Christian Brauner
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2021-04-30 14:44 UTC (permalink / raw)
  To: dsterba, linux-btrfs, Aleksa Sarai

On Fri, Apr 30, 2021 at 03:43:22PM +0200, David Sterba wrote:
> On Fri, Apr 30, 2021 at 03:25:17PM +0200, Christian Brauner wrote:
> > Hey everyone,
> > 
> > Userspace seems to already be catching up with idmapped mount support.
> > Systemd has started making use of it in their container manager and is
> > in the process of expanding useage throughout their codebase (cf. [1]).
> > One of the first requests obviously was "When can we get btrfs"? So I
> > was thinking about starting to work on patches for btrfs to support
> > them. Would you be interested in this if we implement it?
> 
> Yes of course, for feature parity.

Cool, good to hear.

> 
> > I'm preparing
> > the necessary vfs changes currently. I already added a comprehensive
> > generic test-suite to xfstests which would then also cover btrfs as
> > well.
> 
> Great, thanks.  Does it needs vfs changes or is it just updating the
> btrfs callbacks to pass the right namespace?

It needs one vfs change. Btrf uses lookup_one_len() in ioctl.c and these
lookup helpers call inode_permission() which wants to be passed
mnt_userns so I need to expand lookup_one_len() to take a mnt_userns
argument. That's ok though because I don't just need this for btrfs it's
also required for overlayfs and some other fses. I've already done that
work once when I did a POC for overlayfs support that uses those
lookup-helpers all over the place.
I'll send a patch for that soon and if Christoph is happy with it and Al
doesn't kill me I'll carry it for v5.14 and I'll send you patches that
are based on that branch. We are in no hurry of course.

Christian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-30 14:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 13:25 Supporting idmapped mounts Christian Brauner
2021-04-30 13:43 ` David Sterba
2021-04-30 14:44   ` Christian Brauner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.