mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Len Trigg <lenbok@myrealbox.com>
To: linux-kernel@vger.kernel.org, Roman.Hodek@informatik.uni-erlangen.de
Subject: vfat case corruption with utf8
Date: Thu, 27 May 2004 10:01:41 +1200	[thread overview]
Message-ID: <hbhdu2c0fu.wl%len@reeltwo.com> (raw)


Hi,

When I mount a vfat filesystem and create files, the case of the files
changes after creation. I am using Fedora FC2 with kernel 2.6.5. I
have created a script that demonstrates the problem (see below).

I originally filed a bug with fedora about it, and it turns out that
the problem occurs on systems that default to utf8. There is a FIXME
comment in fs/fat/inode.c:1025. Mounting with iocharset=iso8859-1
works around the problem, but given that more systems seem to be going
to utf8, this is something that more people will be banging up
against.


Cheers,
Len.


-------8<--------
#!/bin/sh

# Make a test vfat filesystem
dd if=/dev/zero of=vfatfile bs=1M count=100
mkfs.vfat -F 32 -n "test" vfatfile
mkdir vfatmount
mount -o loop vfatfile vfatmount

# Make a directory called F00 and a test file
mkdir vfatmount/F00
touch vfatmount/F00/test

# Check test file is accessible (it should be)
if [ -f vfatmount/F00/test ]; then
  echo "Test file is visible"
else
  echo "ERROR: test file is not visible"
fi

# This action changes the naming of the directory!!
ls -l vfatmount/

# Check test file again (this time it fails)
if [ -f vfatmount/F00/test ]; then
  echo "Test file is visible"
else
  echo "ERROR: test file is not visible"
fi

# Cleanup
umount vfatfile
rm -r vfatfile vfatmount
-------8<--------

                 reply	other threads:[~2004-05-26 22:02 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=hbhdu2c0fu.wl%len@reeltwo.com \
    --to=lenbok@myrealbox.com \
    --cc=Roman.Hodek@informatik.uni-erlangen.de \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®