public inbox for linux-unionfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Support nested overlayfs mounts
@ 2023-08-17 11:05 Alexander Larsson
  2023-08-17 11:05 ` [PATCH v2 1/5] ovl: Move xattr support to new xattrs.c file Alexander Larsson
                   ` (5 more replies)
  0 siblings, 6 replies; 47+ messages in thread
From: Alexander Larsson @ 2023-08-17 11:05 UTC (permalink / raw)
  To: miklos; +Cc: linux-unionfs, amir73il, Alexander Larsson

There are cases where you want to use an overlayfs mount as a lowerdir for
another overlayfs mount. For example, if the system rootfs is on overlayfs due
to composefs, or to make it volatile (via tmps), then you cannot currently store
a lowerdir on the rootfs, becasue the inner overlayfs will eat all the whiteouts
and overlay xattrs. This means you can't e.g. store on the rootfs a prepared
container image for use using overlayfs.

This patch series adds support for nesting of overlayfs mounts by escaping the
problematic features on and unescaping them when exposing to the overlayfs user.

This series is also available here:
  https://github.com/alexlarsson/linux/tree/ovl-nesting

And xfstest to test it is available here:
  https://github.com/alexlarsson/xfstests/tree/overlayfs-nesting

Changes since v1:

 * Moved all xattr handling to xattr.c
 * Made creation of escaped whiteouts atomic

Alexander Larsson (5):
  ovl: Move xattr support to new xattrs.c file
  ovl: Add OVL_XATTR_TRUSTED/USER_PREFIX_LEN macros
  ovl: Support escaped overlay.* xattrs
  ovl: Support creation of whiteout files on overlayfs
  ovl: Add documentation on nesting of overlayfs mounts

 Documentation/filesystems/overlayfs.rst |  22 ++
 fs/overlayfs/Makefile                   |   2 +-
 fs/overlayfs/dir.c                      |  24 ++-
 fs/overlayfs/inode.c                    | 124 -----------
 fs/overlayfs/namei.c                    |  14 +-
 fs/overlayfs/overlayfs.h                |  40 +++-
 fs/overlayfs/readdir.c                  |   7 +-
 fs/overlayfs/super.c                    |  67 +-----
 fs/overlayfs/util.c                     |  20 ++
 fs/overlayfs/xattrs.c                   | 268 ++++++++++++++++++++++++
 10 files changed, 376 insertions(+), 212 deletions(-)
 create mode 100644 fs/overlayfs/xattrs.c

-- 
2.41.0


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

end of thread, other threads:[~2023-09-08  8:44 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 11:05 [PATCH v2 0/5] Support nested overlayfs mounts Alexander Larsson
2023-08-17 11:05 ` [PATCH v2 1/5] ovl: Move xattr support to new xattrs.c file Alexander Larsson
2023-08-17 12:48   ` Amir Goldstein
2023-08-17 11:05 ` [PATCH v2 2/5] ovl: Add OVL_XATTR_TRUSTED/USER_PREFIX_LEN macros Alexander Larsson
2023-08-17 12:48   ` Amir Goldstein
2023-08-17 11:05 ` [PATCH v2 3/5] ovl: Support escaped overlay.* xattrs Alexander Larsson
2023-08-17 14:31   ` Amir Goldstein
2023-08-17 15:00     ` Alexander Larsson
2023-08-17 11:05 ` [PATCH v2 4/5] ovl: Support creation of whiteout files on overlayfs Alexander Larsson
2023-08-17 13:40   ` Amir Goldstein
2023-08-21 10:59   ` Miklos Szeredi
2023-08-21 12:55     ` Alexander Larsson
2023-08-21 13:25       ` Amir Goldstein
2023-08-21 15:31         ` Alexander Larsson
2023-08-21 15:40           ` Miklos Szeredi
2023-08-21 20:07             ` Alexander Larsson
2023-08-22 13:22     ` Alexander Larsson
2023-08-22 13:56       ` Miklos Szeredi
2023-08-22 14:25         ` Alexander Larsson
2023-08-22 14:36           ` Alexander Larsson
2023-08-22 15:02             ` Miklos Szeredi
2023-08-22 15:31               ` Alexander Larsson
2023-08-22 15:30             ` Amir Goldstein
2023-08-22 15:43               ` Alexander Larsson
2023-08-22 15:57                 ` Amir Goldstein
2023-08-22 16:18                   ` Miklos Szeredi
2023-08-22 17:29                     ` Amir Goldstein
2023-09-08  2:21                       ` Gao Xiang
     [not found]                         ` <CAL7ro1EsjzNeYAbjPN3HnB7Sq4D48my3PGhPG5L+4DTXzA9xFw@mail.gmail.com>
2023-09-08  8:44                           ` Gao Xiang
2023-08-23  8:51                   ` Alexander Larsson
2023-08-23 13:13               ` Alexander Larsson
2023-08-23 13:21                 ` Alexander Larsson
2023-08-23 14:42                 ` Amir Goldstein
2023-08-23 14:52                   ` Miklos Szeredi
2023-08-23 15:02                     ` Alexander Larsson
2023-08-23 15:50                     ` Amir Goldstein
2023-08-24  9:56                       ` Alexander Larsson
2023-08-24 11:43                         ` Amir Goldstein
2023-08-24 14:22                           ` Alexander Larsson
2023-08-25  8:40                             ` Amir Goldstein
2023-08-25 11:29                               ` Alexander Larsson
2023-08-25 14:39                                 ` Amir Goldstein
2023-08-23 14:50                 ` Alexander Larsson
2023-08-17 11:05 ` [PATCH v2 5/5] ovl: Add documentation on nesting of overlayfs mounts Alexander Larsson
2023-08-17 13:31   ` Amir Goldstein
2023-08-17 13:59     ` Alexander Larsson
2023-08-17 14:45 ` [PATCH v2 0/5] Support nested " Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox