public inbox for ntfs3@lists.linux.dev
 help / color / mirror / Atom feed
From: Kari Argillander <kari.argillander@gmail.com>
To: Mark Harmstone <mark@harmstone.com>
Cc: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
	ntfs3@lists.linux.dev
Subject: Re: [PATCH] fs/ntfs3: Fix logic in ntfs_cmp_names_cpu
Date: Fri, 8 Oct 2021 08:51:37 +0300	[thread overview]
Message-ID: <20211008055137.55c7anomki3ylhve@kari-VirtualBox> (raw)
In-Reply-To: <ae5c8b89-5bcf-7ad5-c7b8-d54dd229e5f6@harmstone.com>

On Thu, Oct 07, 2021 at 09:34:02PM +0100, Mark Harmstone wrote:
> On 7/10/21 21:12, Kari Argillander wrote:
> > NTFS is case-sensitive filesystem which Windows treats with tricks like
> > case-insentive.
> 
> This is a distinction without a difference. It's not by default case-sensitive,
> but it is case-preserving.
> 
> > > 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?
> 
> Very dangerous. If you did this in System32 say, you could very easily nuke
> your boot because Windows was looking for NTOSKRNL.EXE rather than ntoskrnl.exe -
> even if that's not the file you were using.
> 
> > > It's worth pointing out that the Linux vfat driver handles case-sensitivity on
> > > Microsoft's other filesystem correctly.
> 
> Question: do you disagree with the approach the vfat writers took? And if not,
> what's the difference between FAT and NTFS in this regard?

Difference be that ntfs will be more commonly use at boot drive or home
folder in Linux.

> Quite apart from anything else, the principle of least astonishment says that
> Linux should follow what the reference implementation does. By all means add
> a mount option to force case-sensitivity throughout, but this shouldn't be
> the default.

Changing behavier before we have mount option or other solution to this
is totally wrong thing to do. Then you basically break Linux user
experience. Example you will not be able to save kernel source to ntfs
and build it from Linux. Sure Windows will not see couple of files, but
it will still work. If you do save something in Linux case sensitive
manner you usually have reason for it so there should not be many
problems to user. We can discuss default after we have solutions.


      reply	other threads:[~2021-10-08  5:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 18:33 [PATCH] fs/ntfs3: Fix logic in ntfs_cmp_names_cpu Mark Harmstone
2021-09-28 19:11 ` Kari Argillander
2021-09-28 22:07 ` Kari Argillander
2021-09-28 23:27   ` Mark Harmstone
2021-10-04 18:25     ` Mark Harmstone
2021-10-06 14:37       ` Konstantin Komarov
2021-10-06 17:03         ` Mark Harmstone
2021-10-07 14:33           ` Konstantin Komarov
2021-10-07 18:26             ` Mark Harmstone
2021-10-07 20:12               ` Kari Argillander
2021-10-07 20:34                 ` Mark Harmstone
2021-10-08  5:51                   ` Kari Argillander [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211008055137.55c7anomki3ylhve@kari-VirtualBox \
    --to=kari.argillander@gmail.com \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=mark@harmstone.com \
    --cc=ntfs3@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox