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: Jan Blunck <jblunck at suse dot de>
- To: hooanon05 at yahoo dot co dot jp
- Cc: bsn dot 0007 at gmail dot com, libc-alpha at sourceware dot org,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 18:12:37 +0200
- Subject: Re: [RFC PATCH 0/2] Union Mount: Directory listing in glibc
- References: <20080429133201.GA9938@localhost.localdomain> <9167.1209482469@jrobl>
On Wed, Apr 30, hooanon05@yahoo.co.jp wrote:
>
> Hello Nagabhushan,
>
> bsn.0007@gmail.com:
> > 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.
> :::
>
> While I don't have objection against the implementation in userspace,
> what will UnionMount handle about rmdir or rename dir?
> Those systemcalls need to test whether the dir is *logically* empty or
> not in kernel space, don't they?
> And I am afraid that UnionMount has to implement the similar thing, but
> it never mean to modify glibc is a bad idea.
For rmdir it is simple: the filesystem that supports whiteouts must know how
to get rid of them again. Since it knows how the whiteouts are implemented it
can do that in an optimized fashion.
The rename story is somehow different. A union directory consists of multiple
directories on different filesystem. Since rename syscall is only working on
one filesystem the rename is crossing devices. Therefore I return -EXDEV. Not
very efficient but really simple. At least this is how my patches implement it.
Regards,
Jan
--
Jan Blunck <jblunck@suse.de>