From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [patch 0/3] A few patches for dcache Date: Fri, 29 Jul 2011 11:50:39 +0400 Message-ID: <20110729075039.GD15883@sun> References: <20110728131219.146414619@openvz.org> <20110729032503.GD5404@dastard> <20110729055918.GB15883@sun> <20110729065951.GE5404@dastard> <20110729072441.GA2203@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Dave Chinner , LINUXFS-ML , Andrew Morton , Christoph Hellwig , James Bottomley , xemul@openvz.org To: Al Viro Return-path: Received: from mail-fx0-f46.google.com ([209.85.161.46]:63368 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755040Ab1G2Huo (ORCPT ); Fri, 29 Jul 2011 03:50:44 -0400 Received: by fxh19 with SMTP id 19so2034660fxh.19 for ; Fri, 29 Jul 2011 00:50:43 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20110729072441.GA2203@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jul 29, 2011 at 08:24:41AM +0100, Al Viro wrote: ... > > > > > > Thanks for comments, Dave! Still the read only lock without > > > increasing sequence number might be useful, no? (patch 1) > > > > I'll defer to Al on that one - the intricacies of the rename locking > > are way over my head. > > I'm not sure that's safe. Note that one use of rename_lock is that > we allow hash lookup to race with d_move(). Which can move object > from one hash chain to another, so hash lookup may end up jumping > from one chain to another and getting a false negative. That's > why __d_lookup() is not safe without read_seqretry loop (or seq_writelock, > of course). > ... Thanks a lot for explanations, Al! Cyrill