Bug 119205 - vfat filesystem mounted -o utf8 loses track of files with name ending in '.'
vfat filesystem mounted -o utf8 loses track of files with name ending in '.'
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-26 06:41 EST by Alexander Dupuy
Modified: 2007-04-18 13:04 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-30 11:41:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Alexander Dupuy 2004-03-26 06:41:25 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Gecko/20030225

Description of problem:
On a vfat filesystem mounted with -o utf8, filenames ending with '.'
are not accessible once they have been created.  Specifically,
creating a file that ends with a '.' (dot) will succeed (with the dot
in the filename, rather than truncated as would be the case without -o
utf8), but further attempts to access that file which cannot be
satisfied from the namei cache will fail.

Version-Release number of selected component (if applicable):
kernel-2.4.20-8

How reproducible:
Always

Steps to Reproduce:
1. mformat a: && mount -t vfat -o utf8 /dev/fd0 /mnt/floppy
2. (cd /mnt/floppy && touch shortnam. 9charname. .short. .longname.
normal.txt MixCase.TxT)
3. ls -al /mnt/floppy; umount /mnt/floppy; mdir a:
    

Actual Results:  ls: /mnt/floppy/shortnam.: No such file or directory
ls: /mnt/floppy/9charname.: No such file or directory
ls: /mnt/floppy/.short.: No such file or directory
ls: /mnt/floppy/.longname.: No such file or directory
total 11
drwxr-xr-x    2 root     root         7168 Mar 26 06:13 .
drwxr-xr-x    5 root     root         4096 Mar 24 02:44 ..
-rwxr-xr-x    1 root     root            0 Mar 26 06:13 MixCase.TxT
-rwxr-xr-x    1 root     root            0 Mar 26 06:13 normal.txt
 Volume in drive A has no label
 Volume Serial Number is 69E2-0046
Directory for A:/

SHORTN~1             0 03-26-2004   6:13  shortnam.
9CHARN~1             0 03-26-2004   6:13  9charname.
SHORT~1              0 03-26-2004   6:13  .short.
LONGNA~1             0 03-26-2004   6:13  .longname.
NORMAL   TXT         0 03-26-2004   6:13  normal.txt
MIXCASE  TXT         0 03-26-2004   6:13  MixCase.TxT
        6 files                   0 bytes
                          1 457 664 bytes free


Expected Results:  There should not have been any errors finding the
files with names ending in '.' (dot).

When mounted without -o utf8, the trailing dots in the filenames are
silently truncated from the long names (and the short name for
shortnam. is SHORTNAM rather than SHORTN~1):

total 11
drwxr-xr-x    2 root     root         7168 Mar 26 06:15 .
drwxr-xr-x    5 root     root         4096 Mar 24 02:44 ..
-rwxr-xr-x    1 root     root            0 Mar 26 06:15 9charname
-rwxr-xr-x    1 root     root            0 Mar 26 06:15 .longname
-rwxr-xr-x    1 root     root            0 Mar 26 06:15 MixCase.TxT
-rwxr-xr-x    1 root     root            0 Mar 26 06:15 normal.txt
-rwxr-xr-x    1 root     root            0 Mar 26 06:15 .short
-rwxr-xr-x    1 root     root            0 Mar 26 06:15 shortnam
 Volume in drive A has no label
 Volume Serial Number is 4D2D-8339
Directory for A:/

SHORTNAM             0 03-26-2004   6:15  shortnam
9CHARN~1             0 03-26-2004   6:15  9charname
SHORT~1              0 03-26-2004   6:15  .short
LONGNA~1             0 03-26-2004   6:15  .longname
NORMAL   TXT         0 03-26-2004   6:15  normal.txt
MIXCASE  TXT         0 03-26-2004   6:15  MixCase.TxT
        6 files                   0 bytes
                          1 457 664 bytes free



Additional info:

While it would be nice if the utf8 mode preserved the trailing dots,
it's not strictly necessary, and reproducing the silent trunction of
trailing '.' (dot) characters in filenames would be better than
creating unreachable files.  Since UTF-8 encoding guarantees that '.'
will only appear as '.' (and not as part of another character's
multibyte encoding) truncating it would be acceptable, although not
optimal.

Interestingly, it's possible to access the files by their shortnames
directly, which is handly if you do this on a hard drive and don't
want to reformat to get rid of the unreachable files:

(cd /tmnt/floppy; rm -f shortn~1 9charn~1 short~1 longna~1)
Comment 1 vigna 2004-03-29 02:07:24 EST
I had the same problem creating directories for my iRiver. The
directory named "R.E.M." has the same behaviour--unaccessible and
undeletable.

To solve even more easily the problem, the trick is mounting manually
using -t msdos. Every file is visible and deletable then.
Comment 2 Bugzilla owner 2004-09-30 11:41:51 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

Note You need to log in before you can comment on or make changes to this bug.