From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753629Ab0CYNp6 (ORCPT ); Thu, 25 Mar 2010 09:45:58 -0400 Received: from daytona.panasas.com ([67.152.220.89]:55883 "EHLO daytona.int.panasas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751314Ab0CYNp4 (ORCPT ); Thu, 25 Mar 2010 09:45:56 -0400 Message-ID: <4BAB6911.5020009@panasas.com> Date: Thu, 25 Mar 2010 15:45:53 +0200 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Thunderbird/3.0.3 MIME-Version: 1.0 To: Al Viro CC: Benny Halevy , linux-fsdevel , "J. Bruce Fields" , pNFS Mailing List , linux-kernel , Doug Nazar Subject: Re: [pnfs] [GIT BISECT] first bad commit: 1f36f774 Switch !O_CREAT case to use of do_last() References: <20100324180622.GS30031@ZenIV.linux.org.uk> <4BAA5955.4000001@gmail.com> <20100324185604.GT30031@ZenIV.linux.org.uk> <4BAB2F5A.30409@panasas.com> <20100325101231.GU30031@ZenIV.linux.org.uk> <20100325105406.GW30031@ZenIV.linux.org.uk> <4BAB51F5.609@panasas.com> <4BAB54B0.3080109@panasas.com> <20100325130610.GZ30031@ZenIV.linux.org.uk> <4BAB656E.8020204@panasas.com> <20100325133746.GA30031@ZenIV.linux.org.uk> In-Reply-To: <20100325133746.GA30031@ZenIV.linux.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 Mar 2010 13:45:55.0797 (UTC) FILETIME=[7E45C850:01CACC21] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/25/2010 03:37 PM, Al Viro wrote: > On Thu, Mar 25, 2010 at 03:30:22PM +0200, Boaz Harrosh wrote: >>> Let's try this: before do_lookup() call there add >>> if (*want_dir) >>> nd->flags |= LOOKUP_DIRECTORY; >> >> Yes this fixes it!! >> 2.6.34-rc2 plus above, now works, horay. (diff attached) >> >>> and see how does it behave. >>> >>> However, even if it does help, it doesn't explain everything. Normal >>> open() on a directory without O_DIRECTORY if flags shouldn't fail with >>> -EISDIR. How did that manage to avoid it all along? > > Does open() of directory _without_ O_DIRECTORY work in e.g. vanilla 2.6.33? > It certainly does for local filesystems and it does for NFSv3; does it work > for NFSv4? In my tests. Every thing is the same safe the client with the above change. So I guess NFSv4 does something different when asked for directory lookup as opposed to files lookup. I guess there is something added/removed to the compound depending on that flag. But I wouldn't know, I am not familiar with this code. NFSv4 someone? Boaz