Re: [PATCH] fs/ntfs3: Fix logic in ntfs_cmp_names_cpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 07, 2021 at 07:26:26PM +0100, Mark Harmstone wrote:
> On 7/10/21 15:33, Konstantin Komarov wrote:
> 
> > This is optimized way of this algorithm ( from comment to ntfs_cmp_names ):
> >   * Straight way to compare names:
> >   * - Case insensitive
> >   * - If name equals and 'upcase' then
> >   * - Case sensitive
> 
> You have your first and third bullet points the wrong way round there. Am I
> right then that the current case-insensitivity stuff is purely to determine
> where the name goes in the $I30 B-tree?
> 
> > I think, that ntfs3 need to be case sensitive.
> > And listed things, that I think support my opinion.
> > That's why I've mentioned that ntfs.sys is case sensitive.
> > That's why I've mentioned FILE_FLAG_POSIX_SEMANTICS and
> > FileCaseSensitiveInformation.
> > I don't think, that copying win32 api behavior is good,
> > when Microsoft makes steps to make ntfs work in posix way.

I agree that Microsoft is making step towards POSIX.

> I'm surprised that what I wrote is controversial... NTFS is a case-insensitive
> filesystem, that allows specific directories to override this with a flag. You
> might wish it were otherwise, but the NTFS specification is defined by what
> Microsoft's driver does.

NTFS is case-sensitive filesystem which Windows treats with tricks like
case-insentive.

> Your driver lets me create a file called foo.txt and one called FOO.TXT in a
> normal directory, and when I double-click on one in Windows the wrong file gets
> opened. That's 100% a bug.

I disagree. NTFS point of view no bug at all. I agree that it maybe
Windows point view might be a bug. I agree that it might be good thing
to add mount option flag to control this behavier. Maybe nicest thing
would be that if we save other file which match case sensitive we just
raise flag for this folder and atleast never Windows will be able handle
those correctly. What do you think about this Konstantin?

> It's worth pointing out that the Linux vfat driver handles case-sensitivity on
> Microsoft's other filesystem correctly.




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux