This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH 0/2] Union Mount: Directory listing in glibc
- From: Erez Zadok <ezk at cs dot sunysb dot edu>
- To: bsn dot 0007 at gmail dot com
- Cc: libc-alpha at sourceware dot org, Jan Blunck <jblunck at suse dot de>, Erez Zadok <ezk at cs dot sunysb dot edu>, linux-kernel at vger dot kernel dot org, linux-fsdevel at vger dot kernel dot org, viro at zeniv dot linux dot org dot uk, Christoph Hellwig <hch at lst dot de>, Ulrich Drepper <drepper at redhat dot com>, Mingming Cao <cmm at us dot ibm dot com>, Dave Hansen <haveblue at us dot ibm dot com>, Trond Myklebust <trond dot myklebust at fys dot uio dot no>, bharata at linux dot vnet dot ibm dot com, David Woodhouse <dwmw2 at infradead dot org>
- Date: Tue, 29 Apr 2008 11:49:37 -0400
- Subject: Re: [RFC PATCH 0/2] Union Mount: Directory listing in glibc
In message <20080429133201.GA9938@localhost.localdomain>, bsn.0007@gmail.com writes:
> Hi,
>
> I went through Bharata's RFC post on glibc based Union Mount readdir solution
> (http://lkml.org/lkml/2008/3/11/34) and have come up with patches
> against glibc to implement the same.
[...]
The last set of discussions on glibc support ended, as I understood it, with
the glibc people objecting to such "special-purpose" code in glibc. See
<http://lkml.org/lkml/2008/3/11/66>. So has anything changed behind the
scenes, or is this idea unlikely to be merged into glibc any time soon, if
ever. (Personally I'd love to rip out the readdir-related code from unionfs
if glibc supported the same.)
> Patch 1. readdir support for union mounted directories.
> I am caching the dirent names in a list to aid duplicate elimination.
> And this cache is stored in DIRP. For duplicate elimination I am using
> strcmp(). I am not sure if this works universally with different types
> of filesystems. Any suggestions here would be welcome.
[...]
You might consider using a hash table instead of a list; it'll be faster in
case where there are a lot of whiteouts/duplicates to process.
Also, I'll reiterate my previous concern that I think you may need to also
handle "opaque directories". See the discussion in section 5.1 "Creation
and deletion of whiteouts", in the original union mounts paper:
<http://www.usenix.org/publications/library/proceedings/neworl/full_papers/mckusick.a>
Cheers,
Erez.