From mboxrd@z Thu Jan 1 00:00:00 1970 From: "NAGABHUSHAN BS" Subject: Re: [RFC PATCH 0/2] Union Mount: Directory listing in glibc Date: Wed, 30 Apr 2008 11:48:06 +0530 Message-ID: References: <20080429133201.GA9938@localhost.localdomain> <20080429160431.GY30780@bolzano.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: libc-alpha@sourceware.org, "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" , "Trond Myklebust" , bharata@linux.vnet.ibm.com, "David Woodhouse" To: "Jan Blunck" Return-path: Received: from fk-out-0910.google.com ([209.85.128.185]:44448 "EHLO fk-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756231AbYD3GSI (ORCPT ); Wed, 30 Apr 2008 02:18:08 -0400 Received: by fk-out-0910.google.com with SMTP id 18so126963fkq.5 for ; Tue, 29 Apr 2008 23:18:06 -0700 (PDT) In-Reply-To: <20080429160431.GY30780@bolzano.suse.de> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Apr 29, 2008 at 9:34 PM, Jan Blunck wrote: > On Tue, Apr 29, bsn.0007@gmail.com wrote: > > > The RFC discussed about the information glibc readdir needs to get about > > union mounted directories and I have assumed the following information > > to be available from the kernel for this implementation. > > > > - Kernel would return all the dirents (including duplicates and whiteouts) > > starting from the topmost directory of the union. > > > > - Indication that this directory is a union mounted directory > > I have assumed that kernel would return a "." whiteout as the first > > directory entry of the union. This would tell glibc readdir(3) that it is > > working with a union mounted directory and it needs to do duplicate > > elimination and whiteout suppression. It starts building a dirent cache > > for this purpose. > > IIRC the intention was to emit a "." whiteout when "changing" from one > directory to the next. That means when the first directory is completely read > the whiteout is emitted. After that glibc knows to start duplicate > removal. > Yes the intention was to get a "." whiteout when changing from one directory to next and thats essentially what i have assumed, for starting duplicate elimination. Along with that i have also assumed to get a "." whiteout as the first directory entry of the union, so as to indicate to glibc that the directory is a union mounted directory. Regards Nagabhushan