Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756361AbYCKMt5 (ORCPT ); Tue, 11 Mar 2008 08:49:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752730AbYCKMtr (ORCPT ); Tue, 11 Mar 2008 08:49:47 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:48194 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752469AbYCKMtq (ORCPT ); Tue, 11 Mar 2008 08:49:46 -0400 Date: Tue, 11 Mar 2008 18:19:35 +0530 From: Bharata B Rao To: Roland McGrath Cc: libc-alpha@sourceware.org, Jan Blunck , Erez Zadok , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, Christoph Hellwig , Ulrich Drepper , Mingming Cao , Dave Hansen Subject: Re: [RFC] Union mount readdir support in glibc Message-ID: <20080311124935.GA9121@in.ibm.com> Reply-To: bharata@linux.vnet.ibm.com References: <20080311055527.GA7256@in.ibm.com> <20080311080929.B076D26F991@magilla.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080311080929.B076D26F991@magilla.localdomain> User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1858 Lines: 41 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/