public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Blunck <jblunck@suse.de>
To: Ulrich Drepper <drepper@redhat.com>
Cc: bharata@linux.vnet.ibm.com, libc-alpha@sourceware.org,
	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>,
	Mingming Cao <cmm@us.ibm.com>, Dave Hansen <haveblue@us.ibm.com>
Subject: Re: [RFC] Union mount readdir support in glibc
Date: Fri, 14 Mar 2008 16:07:12 +0100	[thread overview]
Message-ID: <20080314150638.GA27730@T61> (raw)
In-Reply-To: <47D9F6CC.6010009@redhat.com>

On Thu, Mar 13, Ulrich Drepper wrote:

> There is very little overhead.  Since we copy using getdents multiple
> records it is more efficient than implementing readdir in the kernel.
> This is how efficient normal directory operations must remain.  The only
> slight inefficiency is that we have to copy the entries after getdents()
> because the d_type field is not in the place we expect it at userlevel.
>  For this a new interface could help.

BTW, Since some filesystem always give DT_UNKNOWN an additional stat is
necessary to implement whiteout filtering. I don't want to do that in
kernel-space if possible ...

> Regarding questions you have: if a directory currently is read and file
> are added or removed, all bets are off.
> 
> re seeking: you have to support seeking.  There is no way around it.
> Once again, if any file has been added/removed, all bets are off.  So,
> why not provide a cookie similar to what is done today?  I think it is
> not acceptable to require caching the entire directory content at
> userlevel.  It's bad enough if we have to store the file names for
> duplicate elimination.

Which basically means tracking of the "space" between dirents and maintaining
the relative order of entries. Which is a pain. I already tried to solve this
problem for tmpfs before and it needs a hugh amount of kernel memory for open
directories. In the end I only know of one situation where it is used: very old
glibc when running 32bit applications on 64bit kernel.

Cheers,
Jan

      parent reply	other threads:[~2008-03-14 15:07 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
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 [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=20080314150638.GA27730@T61 \
    --to=jblunck@suse.de \
    --cc=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=libc-alpha@sourceware.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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