From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [RFC][PATCHSET v3] non-recursive pathname resolution & RCU symlinks Date: Fri, 15 May 2015 02:26:45 +0100 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 Cc: Jeremy Allison , Linux Kernel Mailing List , linux-fsdevel , Christoph Hellwig , Neil Brown To: Linus Torvalds Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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...