Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422862AbbEOB0y (ORCPT ); Thu, 14 May 2015 21:26:54 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:53488 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030214AbbEOB0u (ORCPT ); Thu, 14 May 2015 21:26:50 -0400 Date: Fri, 15 May 2015 02:26:45 +0100 From: Al Viro To: Linus Torvalds Cc: Jeremy Allison , Linux Kernel Mailing List , linux-fsdevel , Christoph Hellwig , Neil Brown Subject: Re: [RFC][PATCHSET v3] non-recursive pathname resolution & RCU symlinks Message-ID: <20150515012645.GH7232@ZenIV.linux.org.uk> References: <20150505052205.GS889@ZenIV.linux.org.uk> <20150511180650.GA4147@ZenIV.linux.org.uk> <20150513222533.GA24192@ZenIV.linux.org.uk> <20150514033040.GF7232@ZenIV.linux.org.uk> <20150514220932.GC31808@samba2> <20150514233632.GG7232@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1519 Lines: 31 On Thu, May 14, 2015 at 05:25:39PM -0700, Linus Torvalds wrote: > We can easily make things per-operation, by adding another flag. We > already have per-operation flags like LOOKUP_FOLLOW, which decides if > we follow the last symlink or not. We could add a LOOKUP_ICASE, which > decides whether we compare case or not. Obviously, we'd have to ad the > proper O_ICASE for open (and AT_ICASE for fstatat() and friends). > Exactly like we do for LOOKUP_FOLLOW. > Btw, don't get me wrong. I'm not saying it's a great idea. I think > icase compares are stupid. Really really stupid. But samba might be > worth jumping though a few hoops for. The real problem is that even > with just ASCII, it does make it much easier to create nasty hash > collisions in the dentry hashes (same hash from 256 variations of > aAaAAaaA - just repeat the same letter in different variations of > lower/upper case). Hold on. Should stat("blah", &buf) => ENOENT, OK, let's create it mkdir("blah", 0) => EEXIST, bugger, looks like a race stat("blah", &buf) => ENOENT, Whiskey, Tango, Foxtrot be possible? No per-operation flags passed, doesn't even know of the case-insensitive crap. And if fstatat() without your new flag would find c-i matches, then what does that flag do? Confused... -- 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/