Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752021AbWICELM (ORCPT ); Sun, 3 Sep 2006 00:11:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752020AbWICELM (ORCPT ); Sun, 3 Sep 2006 00:11:12 -0400 Received: from pat.uio.no ([129.240.10.4]:19686 "EHLO pat.uio.no") by vger.kernel.org with ESMTP id S1752018AbWICELK (ORCPT ); Sun, 3 Sep 2006 00:11:10 -0400 Subject: Re: [PATCH 04/22][RFC] Unionfs: Common file operations From: Trond Myklebust To: Josef Sipek Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, akpm@osdl.org, viro@ftp.linux.org.uk In-Reply-To: <20060902024747.GA11964@filer.fsl.cs.sunysb.edu> References: <20060901013512.GA5788@fsl.cs.sunysb.edu> <20060901014138.GE5788@fsl.cs.sunysb.edu> <1157149200.5628.38.camel@localhost> <20060902024747.GA11964@filer.fsl.cs.sunysb.edu> Content-Type: text/plain Date: Sun, 03 Sep 2006 00:10:59 -0400 Message-Id: <1157256659.5637.12.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-UiO-Spam-info: not spam, SpamAssassin (score=-3.199, required 12, autolearn=disabled, AWL 1.80, UIO_MAIL_IS_INTERNAL -5.00) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1062 Lines: 27 On Fri, 2006-09-01 at 22:47 -0400, Josef Sipek wrote: > From what I can see, the solution to this would be to pass the lookup > intents in unionfs_lookup down to the lower filesystem (the way it should be > done in the first place). Then, we could use the dentry here without any > problems. Is that all that needs to be done or am I forgetting something? That sounds correct. If you pass the lookup intents down to the underlying filesystem while doing the lookup, then all should be well: NFS will actually open the file for you at that point too, whereas most other filesystems will just look it up and return the dentry. In any case, you avoid the race, because you lookup/revalidate the underlying dentry at the same time as you lookup/revalidate the unionfs dentry. Cheers, Trond -- VGER BF report: H 0 - 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/