NTFS3 file system kernel mode driver
 help / color / mirror / Atom feed
From: Russell Greene <russellgreene8@gmail.com>
To: ntfs3@lists.linux.dev
Subject: PROBLEM: ntfs3: nocase option seems to be registered incorrectly, has strange behavior
Date: Mon, 18 Mar 2024 21:41:41 -0600	[thread overview]
Message-ID: <CAAOCm6qrUu6n-oHK85hzFR5hWtf_NFckJZcDqHRBH6m1K6z38Q@mail.gmail.com> (raw)

The nocase ntfs3 mount option seems to be incorrectly registered and
requires passing nonocase. It seems this is because it was registered
like
fsparam_flag_no("nocase", Opt_nocase)
It is reported correctly in mtab because ntfs_show_options seems correct.

If you do go ahead and add nonocase to your mount options, there's
some interesting behavior. It feels a bit random, but here's one
surprising sequence of commands:

# mount -t ntfs3 -o nonocase /dev/nvme0n1p3  /mnt
# ls /mnt/ars/build/CMakeCacHe.txt
/mnt/ars/build/CMakeCacHe.txt
# ls /mnt/program\ files\llvm\bin\clang.exe
ls: cannot access '/mnt/program filesllvmbinclang.exe': No such file
or directory
# ls /mnt/program\ files/llvm/bin/clang.exe
ls: cannot access '/mnt/program files/llvm/bin/clang.exe': No such
file or directory
# ls /mnt/Program\ Files/LLVM/bin/clang.exe
'/mnt/Program Files/LLVM/bin/clang.exe'
# ls /mnt/program\ files/llvm/bin/clang.exe
'/mnt/program files/llvm/bin/clang.exe'

It's tricky to get exact reproduction instructions as if I ran this
sequence of events again, it would likely work. Maybe based on
something being cached or not? I kept my typos and commands that did
work in there as they may be relevant, idk. Again, it's quite random.

I discovered this when using my windows boot drive's MSVC install to
cross-compile some binaries, which depends on case-insensitive
behavior. I was able to compile all my code, but it would often fail
out because it could not find a header/library. Using a file search
program to find the file (and nothing else!) seems to circumvent the
issue, at least until likely some cache is dropped or something like
that.

Tested against latest linux-ntfs3/devel as of writing
(6.7.0-rc4-00028-g622cd3daa8ea) as well as 6.8.

Thanks for the time!

                 reply	other threads:[~2024-03-19  3:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAAOCm6qrUu6n-oHK85hzFR5hWtf_NFckJZcDqHRBH6m1K6z38Q@mail.gmail.com \
    --to=russellgreene8@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).