Bug 823887 - Filenames containing Chinese characters can't be created on vfat filesystems
Summary: Filenames containing Chinese characters can't be created on vfat filesystems
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-22 11:36 UTC by Richard W.M. Jones
Modified: 2012-05-25 15:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-25 15:43:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2012-05-22 11:36:26 UTC
Description of problem:

$ guestfish -N fs:vfat -m /dev/sda1 

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> touch /马磊
libguestfs: error: touch: open: /马磊: Invalid argument
><fs> ll /
total 20
drwxr-xr-x  2 root root 16384 Jan  1  1970 .
drwxr-xr-x 23  500  500  4096 May 22 12:35 ..

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

1.18.0

How reproducible:

100%

Steps to Reproduce:
1. See above.

Comment 1 Richard W.M. Jones 2012-05-23 08:56:56 UTC
The bug reporter sent me the disk image which fails
(CA+ePHTDrJHi2z71s5+pZuBWEenBq9oCYuN+VuEhSRiYQFd4C6w.com)

It is a vfat partition containing files with Chinese
characters.  When mounted without any options, these show
up as "?".  When mounted with the "utf8" mount option,
these show up normally.

><fs> list-filesystems 
/dev/vda: vfat
><fs> mount /dev/vda /
><fs> ll /
total 24
drwxr-xr-x  4 root root 4096 Jan  1  1970 .
drwxr-xr-x 23  500  500 4096 May 23 09:53 ..
-rwxr-xr-x  1 root root    0 Nov 30 08:18 ?? ????.txt
-rwxr-xr-x  1 root root   58 Nov 30 08:18 ?? ????.wav
-rwxr-xr-x  1 root root   22 Nov 30 08:18 ?? WinRAR ZIP ????.zip
drwxr-xr-x  6 root root 4096 Dec 12 10:03 root1
drwxr-xr-x  2 root root 4096 Dec 12 10:03 root2

><fs> umount /
><fs> mount-options "utf8" /dev/vda /
><fs> ll /
total 24
drwxr-xr-x  4 root root 4096 Jan  1  1970 .
drwxr-xr-x 23  500  500 4096 May 23 09:53 ..
drwxr-xr-x  6 root root 4096 Dec 12 10:03 root1
drwxr-xr-x  2 root root 4096 Dec 12 10:03 root2
-rwxr-xr-x  1 root root   22 Nov 30 08:18 新建 WinRAR ZIP 压缩文件.zip
-rwxr-xr-x  1 root root    0 Nov 30 08:18 新建 文本文档.txt
-rwxr-xr-x  1 root root   58 Nov 30 08:18 新建 波形声音.wav

Comment 2 Richard W.M. Jones 2012-05-25 15:42:47 UTC
This is essentially a design problem in the Linux kernel.

I have however pushed a documentation fix and a new test
upstream which should help:

https://github.com/libguestfs/libguestfs/commit/6445bc5952efd47fb1aa0880d9038040551d72ed
https://github.com/libguestfs/libguestfs/commit/8e8a5764293d1b6bc3dbfb9409722e4c13384aec


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