linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	vaurora@redhat.com, viro@zeniv.linux.org.uk, jblunck@suse.de,
	hch@infradead.org
Subject: Re: [PATCH 0/5] hybrid union filesystem prototype
Date: Mon, 30 Aug 2010 21:40:27 +1000	[thread overview]
Message-ID: <20100830214027.77e197f5@notabene> (raw)
In-Reply-To: <E1Oq1RL-0003zF-Tw@pomaz-ex.szeredi.hu>

On Mon, 30 Aug 2010 12:18:11 +0200
Miklos Szeredi <miklos@szeredi.hu> wrote:

> On Sun, 29 Aug 2010, Neil Brown wrote:
> > On Fri, 27 Aug 2010 18:53:45 +0200
> > Miklos Szeredi <miklos@szeredi.hu> wrote:
> > 
> > > On Fri, 27 Aug 2010, Neil Brown wrote:
> > > > I was wondering why you even bothered to fiddle st_ino.  Given
> > > > that lots of other things come from one fs or the other, having
> > > > the merged directories appear to be from the upper filesystem
> > > > doesn't seem like a problem.  I don't really care either way
> > > > though.
> > > 
> > > "rm -rf" complains if st_ino of a directory changes spontaneously.
> > 
> > I see...
> > Doesn't that mean that you must always present a merged-directory if the
> > lower directory exists.
> 
> Directory opens are never "forwarded" to the lower filesystem like
> other opens.  One reason is that lookups continuing from the file's
> path need to be on the union filesystem instead on one of the
> underlying filesystems.

You're right - I misread the code there.

> > > I think it's best to leave that stuff until someone actually cares.
> > > The "people might find it useful" argument is not strong enough to put
> > > nontrivial effort into thinking about all the weird corner cases.
> > 
> > My thought on this is that in order to describe the behaviour of the
> > filesystem accurately you need to think about all the weird corner cases.
> > 
> > Then it becomes a question of: is it easier to document the weird behaviour,
> > or change the code so the documentation will be easier to understand?
> > Some cases will go one way, some the other.
> > 
> > But as you suggest this isn't urgent.
> 
> You didn't mention one possibility: add limitations that prevent the
> weird corner cases arising.  I believe this is the simplest option.

Val has been following that approach and asking if it is possible to make an
NFS filesystem really-truly read-only. i.e. no changes.
I don't believe it is.

But I won't pursue this further without patches.


> > My comment about set-theory unions being commutative set me thinking.  I
> > really don't think "union" is the right name for this thing.  There is
> > nothing about it which really fits that proper definition of a union.
> > whiteouts mean that even the list of names in a directory is not the union of
> > the lists of names in the upper and lower directories.
> > "overlay" is a much more accurate name.  But union seems to be the name
> > that is most used.  I wonder if it is too late to change that.
> 
> We could call it overlayfs.  People learn new names quickly :)

+1

> 
> > Also, dnotify (and presumably inotifiy) doesn't work reliably in the current
> > implementation.
> > It works for opaque directories and those which don't have a namesake in the
> > lower filesystem, but for others it never notifies of changes to any files in
> > the directory.
> > This is because dnotify will set an fsnotifier on the merged-directory in the
> > union-fs, but the change happens to the file in the upper fs, so
> > fsnotify_parent will only call notifiers on the parent in the upper fs.
> 
> I think *notify will work correctly, every modificaton will be
> notified on both the union fs and the upper fs.  But I haven't tested
> this yet.

I tried.  It doesn't.
To be precise:  directory changes like file creation (even creation of a file
that already exists) get notified, but purely file-based event like modifying
the contents of the file don't generate events back to the overlayfs
directory.
Because an open (for write) of a file is passed through to the upper
filesystem, the notifications of modification through that open only go to the
upper filesystem.

Thanks,
NeilBrown

  reply	other threads:[~2010-08-30 11:40 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26 18:33 [PATCH 0/5] hybrid union filesystem prototype Miklos Szeredi
2010-08-26 18:33 ` [PATCH 1/5] vfs: implement open "forwarding" Miklos Szeredi
2010-08-26 18:33 ` [PATCH 2/5] vfs: make i_op->permission take a dentry instead of an inode Miklos Szeredi
2010-08-26 20:24   ` David P. Quigley
2010-08-27  4:11     ` Neil Brown
2010-08-27 18:13       ` David P. Quigley
2010-08-27 19:21         ` Valerie Aurora
2010-08-27 18:31       ` David P. Quigley
2010-08-26 18:33 ` [PATCH 3/5] vfs: add flag to allow rename to same inode Miklos Szeredi
2010-08-26 18:33 ` [PATCH 4/5] vfs: export do_splice_direct() to modules Miklos Szeredi
2010-08-26 18:33 ` [PATCH 5/5] union: hybrid union filesystem prototype Miklos Szeredi
2010-09-01 21:42   ` Valerie Aurora
2010-09-02  9:19     ` Miklos Szeredi
2010-09-02 21:33       ` Valerie Aurora
2010-09-03  5:10         ` Neil Brown
2010-09-03  9:16           ` Miklos Szeredi
2010-09-09 16:02             ` David P. Quigley
2010-09-03  8:52         ` Miklos Szeredi
2010-09-02 21:42   ` Valerie Aurora
2010-09-03 12:31     ` Miklos Szeredi
2010-08-27  7:05 ` [PATCH 0/5] " Neil Brown
2010-08-27  8:47   ` Miklos Szeredi
2010-08-27 11:35     ` Neil Brown
2010-08-27 16:53       ` Miklos Szeredi
2010-08-29  4:42         ` Neil Brown
2010-08-30 10:18           ` Miklos Szeredi
2010-08-30 11:40             ` Neil Brown [this message]
2010-08-30 12:20               ` Miklos Szeredi
2010-08-31 19:18                 ` Valerie Aurora
2010-08-31 20:19                   ` Trond Myklebust
2010-09-01  1:56                     ` Valerie Aurora
2010-09-01  4:04                       ` Trond Myklebust
2010-09-01  4:33               ` Neil Brown
2010-09-01 20:11                 ` Miklos Szeredi
2010-08-31 19:29             ` Valerie Aurora
2010-09-02 13:15             ` Jan Engelhardt
2010-09-02 13:32               ` Neil Brown
2010-09-02 14:25                 ` Jan Engelhardt
2010-09-02 14:28                   ` Miklos Szeredi
2010-09-08 19:47                     ` David P. Quigley
2010-09-23 13:18                   ` Jan Engelhardt
2010-09-23 19:22                     ` Valerie Aurora
2010-08-30 18:38       ` Valerie Aurora
2010-08-30 23:12         ` Neil Brown
2010-08-31 11:00           ` Miklos Szeredi
2010-08-31 11:24             ` Neil Brown
2010-08-31 15:05               ` Kyle Moffett
2010-08-31 20:36                 ` Valerie Aurora

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=20100830214027.77e197f5@notabene \
    --to=neilb@suse.de \
    --cc=hch@infradead.org \
    --cc=jblunck@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --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).