From: "Stephen C. Tweedie" <sct@redhat.com>
To: Andreas Dilger <adilger@turbolinux.com>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
Alexander Viro <viro@math.psu.edu>,
Andreas Dilger <adilger@enel.ucalgary.ca>,
linux-kernel@vger.kernel.org, "Theodore Y. Ts'o" <tytso@mit.edu>,
Ext2 development mailing list <ext2-devel@lists.sourceforge.net>
Subject: Re: [Ext2-devel] Re: [RFC] ext2_new_block() behaviour
Date: Fri, 5 Jan 2001 11:29:56 +0000 [thread overview]
Message-ID: <20010105112956.V1290@redhat.com> (raw)
In-Reply-To: <20010104232541.J1290@redhat.com> <200101050706.f0576lB12236@webber.adilger.net>
In-Reply-To: <200101050706.f0576lB12236@webber.adilger.net>; from adilger@turbolinux.com on Fri, Jan 05, 2001 at 12:06:47AM -0700
Hi,
On Fri, Jan 05, 2001 at 12:06:47AM -0700, Andreas Dilger wrote:
> Stephen, you write:
> > On Thu, Jan 04, 2001 at 05:31:12PM -0500, Alexander Viro wrote:
> > > BTW, what inumber do you want for whiteouts? IIRC, we decided to use
> > > the same entry type as UFS does (14), but I don't remember what was
> > > the decision on inumber. UFS uses 1 for them, is it OK with you?
> >
> > 0 is used for padding, so 1 makes sense, yes.
>
> Sorry, but what are whiteouts? Inode 1 in ext2 is the bad blocks inode,
> so it will never be used for a valid directory entry, but depending on
> what it is we may want to make sure e2fsck is OK with it as well.
Whiteouts are used for union filesystems, where you layer one
filesystem over another so that all modifications are made in the
"upper" layer, but unmodified files stay in the "lower" layer. That
way, you can layer an empty filesystem on top of some other directory
and get what is essentially a free snapshot of that directory.
In such a scheme, whiteouts are used if you unlink a file from the
union mount. The lower-layered filesystem is effectively readonly as
far as the union is concerned, so we record the unlink by adding a
whiteout entry in the upper filesystem. A lookup for that name in the union
filesystem will find the whiteout and will return ENOENT immediately
without looking to see if the entry exists in the lower filesystem.
We still need to return the whiteouts to user space for getdents(),
though: union filesystems normally deal with readdir() by reading the
whole set of dentries into user space and sorting them there, so the
whiteout is semantically significant to getdents().
Cheers,
Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
prev parent reply other threads:[~2001-01-05 11:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-30 22:13 [CFT][RFC] ext2_new_inode() fixes and cleanup Alexander Viro
2000-11-30 23:18 ` Theodore Y. Ts'o
2000-12-01 12:55 ` Alexander Viro
2000-12-01 8:27 ` Andreas Dilger
2000-12-01 11:28 ` Alexander Viro
2001-01-02 23:33 ` [RFC] ext2_new_block() behaviour Alexander Viro
2001-01-03 1:47 ` Andreas Dilger
2001-01-03 3:37 ` Alexander Viro
2001-01-03 12:16 ` [Ext2-devel] " Stephen C. Tweedie
2001-01-03 16:12 ` Alexander Viro
2001-01-04 4:42 ` Oliver Xymoron
2001-01-04 5:06 ` Alexander Viro
2001-01-04 5:15 ` Oliver Xymoron
2001-01-04 22:04 ` Stephen C. Tweedie
2001-01-04 22:31 ` Alexander Viro
2001-01-04 20:48 ` -bird tree " Marcelo Tosatti
2001-01-04 23:25 ` Stephen C. Tweedie
2001-01-05 7:06 ` Andreas Dilger
2001-01-05 11:29 ` Stephen C. Tweedie [this message]
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=20010105112956.V1290@redhat.com \
--to=sct@redhat.com \
--cc=adilger@enel.ucalgary.ca \
--cc=adilger@turbolinux.com \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@math.psu.edu \
/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