public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Roland McGrath <roland@redhat.com>
Cc: libc-alpha@sourceware.org, Jan Blunck <jblunck@suse.de>,
	Erez Zadok <ezk@cs.sunysb.edu>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	viro@zeniv.linux.org.uk, Christoph Hellwig <hch@lst.de>,
	Ulrich Drepper <drepper@redhat.com>,
	Mingming Cao <cmm@us.ibm.com>, Dave Hansen <haveblue@us.ibm.com>
Subject: Re: [RFC] Union mount readdir support in glibc
Date: Tue, 11 Mar 2008 18:19:35 +0530	[thread overview]
Message-ID: <20080311124935.GA9121@in.ibm.com> (raw)
In-Reply-To: <20080311080929.B076D26F991@magilla.localdomain>

On Tue, Mar 11, 2008 at 01:09:29AM -0700, Roland McGrath wrote:
> It seems very unlikely you'd come up with a version of this plan that we'd
> find acceptable in glibc.  readdir does buffering, sometimes entry format
> conversion, and it can skip dummy entries.  That's it.  It's not going to
> become a big hairy thing with all kinds of new state.  Sorry.

In the approach we are suggesting, at the minimum, glibc readdir would
have to maintain a unified cache of dirents with the knowlege of
whiteouts (DT_WHT). Would that be too much ?

> 
> This really is the kernel filesystem's problem.  It just doesn't make sense
> to expect userland to implement half of your directory semantics for you.
> What are you going to do when you want to export a union directory to NFS?
> readdir is a filesystem operation.  You're implementing a filesystem.

Not really. In Union Mount, most of the unification support is done at
VFS layer with some support from filesystems (for things like
whiteouts). It is Unionfs which implements a new filesystem to achieve
unification. Unification is not purely a kernel filesystem's problem, it
involves both VFS and FS.

> 
> Exposing DT_WHT entries may be useful as a user feature.  (BSD had unions
> with whiteouts years ago, and their ls et al have options to let you see
> and operate on whiteouts explicitly so users can make sense of strange
> situations with unions.)  But even for that, we'd have to consider the
> compatibility issues.

AFAIK, even BSD implements duplicate elimination and whiteout
suppression in the userland.

Thanks for your comments.

Regards,
Bharata.

  reply	other threads:[~2008-03-11 12:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11  5:55 [RFC] Union mount readdir support in glibc Bharata B Rao
2008-03-11  8:09 ` Roland McGrath
2008-03-11 12:49   ` Bharata B Rao [this message]
2008-03-12  4:28   ` Bharata B Rao
2008-03-14  3:53 ` Ulrich Drepper
2008-03-14  5:39   ` Al Viro
2008-03-14  7:13     ` Ulrich Drepper
2008-03-14  8:41       ` Miklos Szeredi
2008-03-14 17:53         ` Peter Staubach
2008-03-14 20:51           ` Miklos Szeredi
2008-03-14 20:58           ` Trond Myklebust
2008-03-14 15:07   ` Jan Blunck

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=20080311124935.GA9121@in.ibm.com \
    --to=bharata@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=drepper@redhat.com \
    --cc=ezk@cs.sunysb.edu \
    --cc=haveblue@us.ibm.com \
    --cc=hch@lst.de \
    --cc=jblunck@suse.de \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@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