From: "J. R. Okajima" <hooanon05g@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: viro@ZenIV.linux.org.uk, torvalds@linux-foundation.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
hch@infradead.org, akpm@linux-foundation.org, apw@canonical.com,
nbd@openwrt.org, neilb@suse.de, jordipujolp@gmail.com,
ezk@fsl.cs.sunysb.edu, dhowells@redhat.com,
sedat.dilek@gmail.com, mszeredi@suse.cz
Subject: Re: [PATCH 00/13] overlay filesystem v22
Date: Mon, 26 May 2014 10:56:42 +0900 [thread overview]
Message-ID: <25513.1401069402@jrobl> (raw)
In-Reply-To: <1400838223-30844-1-git-send-email-miklos@szeredi.hu>
Thanks for CC-ing me.
Here are some comments.
- I have no objection about the 0:0 char-dev whiteout, but you don't
have to have the inode for each whiteout. The hardlink is better.
In this version, you have <workdir> now. How about creating a "base"
whiteout under workdir at the mount-time? Maybe it is possible by
user-space "mount.overlayfs" or kernel-space. When the whiteout meets
EMLINK, create a non-hardlink for that target synchronously and
re-create the "base" asynchronously.
- Is <workdir>/work always visible to users? If a user accidentally
removes it or its children, then some operations will fail. And he
cannot recover it anymore. I know it cannot easily happen since its
mode is 0. But I am afraid it will be a source of troubles. For
example, find(1) or "ls -R /overlayfs" will almost always fail.
- If I remember correctly, the length of the dir mutex is held time has
been pointed out. This version has still a long mutex held time, a whole
copy-up operation includeing lookup, create, copy filedata, copy
xattr/attr, and then rename. How about unlock the dir before copying
filedata and re-lock and confirm after copying attr?
- When two processes copy-up a similar dir hierarcy, for example
/dirA/dirB/fileC and /dirA/dirB/dirC/fileD, may a race condition
happen? Two processes begin copying-up dirA, first processA succeeds
it and second processB fails and returns EIO?
- All copy-up operations will be serialized due to <workdir> lock.
- In fstat(2) for a dir, is nlink set to 1 even it is removed?
- In readdir, it lookup or getattr to determine whether the found char
dev entry is a whiteout or not. I know a char dev is not so many, so
this overhead won't be large. But if its name represented "I am a
whiteout", then the extra lookup or getattr would be unnecessary.
My personal impression for overall is overlayfs starts growing.
Also several parts look like towarding aufs. For example,
- a <workdir> means an overlayfs specific work. Aufs has such special
dir for copying-up an unlinked file and a pseudo-link. Both are
unnecessary for overlayfs because overlayfs copies-up a file in
open(2) time, and doesn't support the hardlink between layers.
- many small wrapper functions for VFS helpers resemble to aufs
too. In aufs, all they have lockdep_off/on.
- the internal cache for readdir allocating extra memory. Aufs adopts
a simple hashing, while overlayfs uses rbtree.
But of course the fundamental design differences between overlayfs and
aufs are kept, such as
- a name-based union .vs. an inode-aware union
- multiple layers
- allow users to access the layers directly
- etc...
If LKML people consider merging overlayfs, then I'd ask to consier aufs
too. The basic design is unchanged since when I posted a few years ago.
http://marc.info/?l=linux-kernel&m=123934927611907&w=2
And latest one is
http://aufs.sourceforge.net
J. R. Okajima
next prev parent reply other threads:[~2014-05-26 1:56 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 9:43 [PATCH 00/13] overlay filesystem v22 Miklos Szeredi
2014-05-23 9:43 ` [PATCH 01/13] vfs: add i_op->dentry_open() Miklos Szeredi
2014-05-23 9:43 ` [PATCH 02/13] vfs: export do_splice_direct() to modules Miklos Szeredi
2014-05-23 9:43 ` [PATCH 03/13] vfs: export __inode_permission() " Miklos Szeredi
2014-05-23 9:43 ` [PATCH 04/13] vfs: introduce clone_private_mount() Miklos Szeredi
2014-05-23 9:43 ` [PATCH 05/13] vfs: export check_sticky() Miklos Szeredi
2014-05-23 9:43 ` [PATCH 06/13] vfs: add whiteout support Miklos Szeredi
2014-05-24 8:29 ` Tetsuo Handa
2014-05-23 9:43 ` [PATCH 07/13] vfs: add RENAME_WHITEOUT Miklos Szeredi
2014-05-24 8:02 ` Azat Khuzhin
2014-05-23 9:43 ` [PATCH 08/13] overlay filesystem Miklos Szeredi
2014-05-23 9:43 ` [PATCH 09/13] overlayfs: add statfs support Miklos Szeredi
2014-05-23 9:43 ` [PATCH 10/13] overlayfs: implement show_options Miklos Szeredi
2014-05-23 9:43 ` [PATCH 11/13] overlay: overlay filesystem documentation Miklos Szeredi
2014-05-23 9:43 ` [PATCH 12/13] fs: limit filesystem stacking depth Miklos Szeredi
2014-05-23 9:43 ` [PATCH 13/13] vfs: dcache: Export d_ancestor to modules Miklos Szeredi
2014-05-26 1:56 ` J. R. Okajima [this message]
2014-05-28 16:06 ` [PATCH 00/13] overlay filesystem v22 Miklos Szeredi
2014-05-29 10:26 ` David Howells
2014-05-29 11:26 ` Miklos Szeredi
2014-05-29 10:54 ` Kernel errors with " David Howells
2014-05-29 11:16 ` David Howells
2014-05-29 11:28 ` David Howells
2014-05-29 12:07 ` Miklos Szeredi
2014-05-29 16:06 ` Miklos Szeredi
2014-05-29 16:10 ` Sedat Dilek
2014-05-29 16:23 ` More kernel " David Howells
2014-05-29 16:36 ` Miklos Szeredi
2014-05-29 16:44 ` David Howells
2014-05-29 16:48 ` Unionmount and overlayfs testsuite David Howells
2014-05-29 17:11 ` Sedat Dilek
2014-05-29 17:15 ` David Howells
2014-05-29 17:19 ` Sedat Dilek
2014-05-29 17:24 ` David Howells
2014-05-29 17:36 ` Sedat Dilek
2014-05-29 17:41 ` David Howells
2014-05-29 17:44 ` Sedat Dilek
2014-05-29 18:22 ` David Howells
2014-05-29 18:44 ` Sedat Dilek
2014-05-29 18:53 ` Sedat Dilek
2014-05-29 19:20 ` David Howells
2014-05-29 19:24 ` Sedat Dilek
2014-05-29 19:25 ` David Howells
2014-05-29 19:28 ` Sedat Dilek
2014-05-29 19:35 ` David Howells
2014-05-29 20:00 ` Sedat Dilek
2014-05-29 20:59 ` David Howells
2014-05-30 4:15 ` Sedat Dilek
2014-05-30 4:29 ` Sedat Dilek
2014-05-30 7:54 ` David Howells
2014-05-29 17:35 ` Sedat Dilek
2014-05-29 17:50 ` David Howells
2014-05-29 17:58 ` Sedat Dilek
2014-05-29 18:23 ` Dave Jones
2014-05-29 18:27 ` David Howells
2014-05-29 17:17 ` David Howells
2014-05-29 23:21 ` Dave Chinner
2014-05-30 3:35 ` J. R. Okajima
2014-05-30 4:44 ` J. R. Okajima
2014-05-30 8:49 ` David Howells
2014-05-30 9:15 ` J. R. Okajima
2014-06-03 8:08 ` Sedat Dilek
2014-06-03 9:00 ` David Howells
2014-06-03 9:12 ` Miklos Szeredi
2014-06-03 9:18 ` Sedat Dilek
2014-06-03 9:26 ` Sedat Dilek
2014-06-03 9:39 ` Sedat Dilek
2014-06-03 9:42 ` Miklos Szeredi
2014-06-03 10:15 ` Sedat Dilek
2014-06-03 10:21 ` Sedat Dilek
2014-06-03 10:55 ` Sedat Dilek
2014-06-03 10:33 ` David Howells
2014-06-03 13:21 ` Miklos Szeredi
2014-06-03 14:26 ` Sedat Dilek
2014-06-03 15:30 ` David Howells
2014-06-03 15:53 ` Miklos Szeredi
2014-06-05 22:16 ` David Howells
2014-06-24 16:46 ` Overlayfs rename bug David Howells
2014-07-08 9:29 ` Miklos Szeredi
2014-07-08 9:56 ` David Howells
2014-07-09 14:14 ` Miklos Szeredi
2014-05-30 9:14 ` Unionmount and overlayfs testsuite David Howells
2014-05-29 17:29 ` Kernel errors with overlay filesystem v22 David Howells
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=25513.1401069402@jrobl \
--to=hooanon05g@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=dhowells@redhat.com \
--cc=ezk@fsl.cs.sunysb.edu \
--cc=hch@infradead.org \
--cc=jordipujolp@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=nbd@openwrt.org \
--cc=neilb@suse.de \
--cc=sedat.dilek@gmail.com \
--cc=torvalds@linux-foundation.org \
--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).