xfs
[Top] [All Lists]

Re: [PATCH 05/16] xfs: return the first match during case-insensitive lo

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 05/16] xfs: return the first match during case-insensitive lookup.
From: Ben Myers <bpm@xxxxxxx>
Date: Thu, 9 Oct 2014 10:42:40 -0500
Cc: linux-fsdevel@xxxxxxxxxxxxxxx, olaf@xxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20141006221928.GJ2301@dastard>
References: <20141003214758.GY1865@xxxxxxx> <20141003215542.GD1865@xxxxxxx> <20141006221928.GJ2301@dastard>
User-agent: Mutt/1.5.20 (2009-06-14)
On Tue, Oct 07, 2014 at 09:19:28AM +1100, Dave Chinner wrote:
> On Fri, Oct 03, 2014 at 04:55:42PM -0500, Ben Myers wrote:
> > From: Olaf Weber <olaf@xxxxxxx>
> > 
> > Change the XFS case-insensitive lookup code to return the first match
> > found, even if it is not an exact match. Whether a filesystem uses
> > case-insensitive lookups is determined by a superblock bit set during
> > filesystem creation.  This means that normal use cannot create two files
> > that both match the same filename.
> > 
> > Signed-off-by: Olaf Weber <olaf@xxxxxxx>
> 
> This is really dependent on whether we want to support mixed
> CI/non-CI filesystems, yes? i.e. if we want to support mixed case
> setups, then we need to keep the code as it stands?

It depends upon what semantics you decide are correct in the mixed case.
This is just one solution.

> What is the
> downside of keeping the code unchaged and our options open?

The code that is being removed here was for the case when you could have
multiple filenames that match for a lookup, which was only possible when
the ascii-ci bit was implemented as a mount option.  The mount option
was never merged, and the ascii-ci bit is implemented at mkfs and is not
changeable over the lifetime of the filesystem.  So today this code is
not doing us much good.  Maybe there are performance implications where
you have a hash collision, but mostly I think it makes sense to remove
this code from a maintainability standpoint.

-Ben

<Prev in Thread] Current Thread [Next in Thread>