From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265825AbUEZWCc (ORCPT ); Wed, 26 May 2004 18:02:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265830AbUEZWCc (ORCPT ); Wed, 26 May 2004 18:02:32 -0400 Received: from 210-55-139-211.innovationwaikato.co.nz ([210.55.139.211]:1762 "EHLO giger.nz.reeltwo.com") by vger.kernel.org with ESMTP id S265825AbUEZWCX (ORCPT ); Wed, 26 May 2004 18:02:23 -0400 Date: Thu, 27 May 2004 10:01:41 +1200 Message-ID: From: Len Trigg To: linux-kernel@vger.kernel.org, Roman.Hodek@informatik.uni-erlangen.de Subject: vfat case corruption with utf8 User-Agent: Wanderlust/2.11.23 (Wonderwall) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 XEmacs/21.4 (patch 15) (Security Through Obscurity) (i686-pc-linux) X-Payment: hashcash 1.2 0:040526:linux-kernel@vger.kernel.org:2ce40651de24a329d340b6cc X-Hashcash: 0:040526:linux-kernel@vger.kernel.org:2ce40651de24a329d340b6cc X-Payment: hashcash 1.2 0:040526:roman.hodek@informatik.uni-erlangen.de:2ebc578716082f37ebaacc28 X-Hashcash: 0:040526:roman.hodek@informatik.uni-erlangen.de:2ebc578716082f37ebaacc28 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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<--------