Re: [PATCH v2 4/5] ovl: Support creation of whiteout files on overlayfs

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

 



Hi Alexander,

On 2023/9/8 16:30, Alexander Larsson wrote:


On Fri, Sep 8, 2023 at 4:21 AM Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx <mailto:hsiangkao@xxxxxxxxxxxxxxxxx>> wrote:


..

     > I hope I got the use case correctly?
    Sorry for the dumb questions below.  I'm interested in the use cases:
    after checking the previous github issue and emails (sorry if I'm
    still missing something), I'm curious about this too.

    I totally understand how it plans to work and how it works (by using
    escape xattr prefixes) but I'm not sure if I'm quite understand the
    original issue:

    Do composefs use cases store overlayfs xattrs in the meta-only layer?
    if so, such layer is actually hand-crafted by mkfs.  Why do we need
    a way to keep escape xattrs on the underlay overlayfs?  Does the
    other layer are data-only layers (do we keep some overlay xattrs in
    these data-only layers)?


Here is the problem statement:

I use composefs for my rootfs. I want to be able to store any kind of files in it and have them be visible in the final rootfs. In particular I want it to contain a whiteout file, because I want to mount an additional overlayfs where the lowerdir is stored on the rootfs (i.e. in the composefs mount).

The naive way to accomplish this is to just put a chardev(0,0) file in the erofs image that is the metadata layer in the rootfs overlayfs. I mean, that is what we do with all other file types.

However, if you were to do this, then the overlayfs that composefs uses will interpret the whiteout as masking out a file from the data-only layer in the composefs mount. This means the whiteout file we wanted is not visible in the final rootfs.

Thanks for your explanation.  That is helpful for me to
know what was happening here.

Okay, I got the point, so basically I think the original
use case is to have a way to "make such whiteouts in the
meta-only layer that overlayfs doesn't interpret/drop in
the composefs mount" (yes, a special whiteout is a
workable solution. )

Personally, there could be several ways to resolve this.
I have no more questions, thanks for the reply :)

Thanks,
Gao Xiang


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Alexander Larsson                                Red Hat, Inc
alexl@xxxxxxxxxx <mailto:alexl@xxxxxxxxxx>alexander.larsson@xxxxxxxxx <mailto:alexander.larsson@xxxxxxxxx>



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux