linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Suchanek <hramrach@centrum.cz>
To: Valerie Aurora <vaurora@redhat.com>
Cc: Andreas Gruenbacher <agruen@suse.de>,
	Andy Whitcroft <apw@canonical.com>,
	Scott James Remnant <scott@canonical.com>,
	Vladimir Dronnikov <dronnikov@gmail.com>,
	Felix Fietkau <nbd@openwrt.org>,
	Miklos Szeredi <miklos@szeredi.hu>,
	linuxram@us.ibm.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, neilb@suse.de,
	viro@zeniv.linux.org.uk
Subject: Re: [PATCH 6/7 v3] overlay: hybrid overlay filesystem prototype
Date: Mon, 11 Oct 2010 11:41:54 +0200	[thread overview]
Message-ID: <AANLkTindWa7gLbcfF1GE8jcwkJ0bgOGbvuSS2nWSHkLj@mail.gmail.com> (raw)
In-Reply-To: <20101006173141.GB18479@shell>

On 6 October 2010 19:31, Valerie Aurora <vaurora@redhat.com> wrote:
> On Fri, Oct 01, 2010 at 11:34:57AM +0200, Andreas Gruenbacher wrote:
>> On Thursday 30 September 2010 23:51:15 Valerie Aurora wrote:
>> >
>> > Hm, this was a pretty basic assumption for me - that you'd want to
>> > construct a topmost image offline that would be "merged" with the
>> > lower layers.  So, for example:
>> >
>> > Topmost layer contains:
>> >
>> > /etc/hostname
>> >
>> > Lower layers contain everything else in /etc/.  So /etc/ would exist
>> > on the topmost layer at the time of union mount, but we would want it
>> > to be transparent.  But if we created a new dir *during* the union
>> > mount, it would be opaque.
>> >
>> > What was your model?
>>
>> The prevalent use case probably is to start out with an empty topmost layer on
>> top of an existing file system.  When things are modified, changes obviously
>> go into the topmost layer.  Additional layers can later be stacked on top of
>> that, turning the previous topmost layer into a read-only lower layer.
>>
>> Overlaying preexisting file systems doesn't seem that important; users
>> commonly should be able to start out with an empty topmost layer instead.  To
>
> Okay, that surprises me.  Let me check my assumptions.  I cc'd several
> people who seem to be actively using unionfs or aufs in ways that we
> want union mounts to replace.  Do you start out with an empty topmost
> file system in most cases?  Or do you prepopulate with some files in
> dirs you want to be transparent?

In all the cases I used a union mouont I started with a blank top layer.

I commonly use it to make a readonly live CD filesystem writable so
that a system can run on top of it.

I tried to use a union to build a software on top of a readonly source
directory.

In both these cases the filesystem starts empty and is only populated
by writing into the union mount.

In both these cases the top layer is often thrown away after use but
can be saved to reconstruct the union later, either as filesystem
image or a tar/cpio archive. In the case of archive reconstructing the
union includes prepopulating the top layer.

In both these cases the bottom should typically not change between
unmounting the union and reconstructing it again but it may change if
the live CD or sources are updated between unmounting the union and
reconstructing it again. There are number of reasons why this may
break for the user but if unionmount does not support falling through
existing top level directories then this is one more reason, perhaps
unexpected.

Fine control over transparency of top layer is not required in most of
these use cases. A simple flag that can perhaps be specified on mount
and/or saved in superblock could say if the filesystem contains union
entries or not. In a plain non-union filesystem all directories are
transparent and whiteouts or fallthrus are invalid. In a filesystem
previously mounted as top union layer all directories are opaque. This
should cover most cases except the case when the opaque top layer can
hide updates to the bottom layer.

Note that whatever is implemented saving the top layer in an archive
is not likely to work because currently no archiving programs would
support whiteouts or fallthrus. With aufs this can work when these are
saved as specially named files or a separate table.

Either way implications of the current implementation should be
clearly documented.

I don't think manipulating the transparency and whiteouts would be
used for much but testing.

I can imagine some specialized tool that compares two bottom images
and then manipulates a saved top layer such that the differences
between the bottom images become visible when the new bottom is
overlayed with the saved top.  Still it will not work in all cases
because changes between top and bottom and between old and new bottom
cannot always be merged automatically. A companion 'revert' tool which
changes an entry in mounted union into a fallthru would come handy I
guess.

I doubt many people would use anything this complex.

Thanks

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-10-11  9:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-20 18:04 [PATCH 0/7 v3] overlay filesystem prototype Miklos Szeredi
2010-09-20 18:04 ` [PATCH 1/7 v3] vfs: implement open "forwarding" Miklos Szeredi
2010-09-20 18:04 ` [PATCH 2/7 v3] vfs: make i_op->permission take a dentry instead of an inode Miklos Szeredi
2010-09-20 18:04 ` [PATCH 3/7 v3] vfs: add flag to allow rename to same inode Miklos Szeredi
2010-09-23 22:04   ` Valerie Aurora
2010-09-20 18:04 ` [PATCH 4/7 v3] vfs: export do_splice_direct() to modules Miklos Szeredi
2010-09-20 18:04 ` [PATCH 5/7 v3] vfs: fix possible use after free in finish_open() Miklos Szeredi
2010-09-23 20:19   ` Valerie Aurora
2010-09-20 18:04 ` [PATCH 6/7 v3] overlay: hybrid overlay filesystem prototype Miklos Szeredi
2010-09-22 23:21   ` Valerie Aurora
2010-09-24 14:33     ` Jens Axboe
2010-09-24 17:16       ` Valerie Aurora
2010-09-24 17:56   ` Valerie Aurora
2010-09-27  8:11     ` Miklos Szeredi
2010-09-27 11:49       ` Andreas Gruenbacher
2010-09-27 12:15         ` J. R. Okajima
2010-09-27 18:47       ` Valerie Aurora
2010-09-28  8:24         ` Andreas Gruenbacher
2010-09-30 21:51           ` Valerie Aurora
2010-10-01  9:34             ` Andreas Gruenbacher
2010-10-06 17:31               ` Valerie Aurora
2010-10-11  9:41                 ` Michal Suchanek [this message]
2010-10-11 13:51                 ` Scott James Remnant
2010-09-20 18:04 ` [PATCH 7/7 v3] overlay: overlay filesystem documentation Miklos Szeredi
2010-09-21  1:31 ` [PATCH 0/7 v3] overlay filesystem prototype Neil Brown
2010-09-22  9:50   ` Miklos Szeredi

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=AANLkTindWa7gLbcfF1GE8jcwkJ0bgOGbvuSS2nWSHkLj@mail.gmail.com \
    --to=hramrach@centrum.cz \
    --cc=agruen@suse.de \
    --cc=apw@canonical.com \
    --cc=dronnikov@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=miklos@szeredi.hu \
    --cc=nbd@openwrt.org \
    --cc=neilb@suse.de \
    --cc=scott@canonical.com \
    --cc=vaurora@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).