This is the mail archive of the
mailing list for the glibc project.
Re: [RFC] Union mount readdir support in glibc
- From: Roland McGrath <roland at redhat dot com>
- To: bharata at linux dot vnet dot ibm 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>
- Date: Tue, 11 Mar 2008 01:09:29 -0700 (PDT)
- Subject: Re: [RFC] Union mount readdir support in glibc
- References: <20080311055527.GA7256@in.ibm.com>
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.
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.
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