[Bug 217440] FAT32 formatted USB stick with files written by PS4 - Invalid argument, unable to list directory contents

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Mar 4 18:02:29 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217440

--- Comment #4 from Conrad Meyer <cem at freebsd.org> ---
It looks like you may be able to use mount_msdosfs -o shortnames (-s) or -o
nowin95 (-9) as a workaround to access your file, for now.

$ dd if=/dev/zero of=./testfs bs=1m count=64
$ sudo mdconfig -a -t vnode -f testfs
md1
$ sudo newfs_msdos -c1 -F32 /dev/md1
/dev/md1: 129022 sectors in 129022 FAT32 clusters (512 bytes/cluster)
BytesPerSec=512 SecPerClust=1 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63
Heads=16 HiddenSecs=0 HugeSectors=131072 FATsecs=1008 RootCluster=2 FSInfo=1
Backup=2
$ mkdir testdir
$ sudo mount_msdosfs /dev/md1 ./testdir

$ touch "testdir/test™"
touch: testdir/test™: Invalid argument

$ sudo dtrace -n "fbt:::return /arg1==EINVAL/ { stack(); }" -c "touch
'testdir/test™'"                                                    ⏎
dtrace: description 'fbt:::return ' matched 30012 probes
touch: 'testdir/test™': No such file or directory         <<< different error? 
Only happens under dtrace
dtrace: pid 12937 exited with status 1
CPU     ID                    FUNCTION:NAME
  3  56556                    _vhold:return
              kernel`cache_lookup+0xba7
              kernel`vfs_cache_lookup+0xac
              kernel`VOP_LOOKUP_APV+0x87
              kernel`lookup+0x711
              kernel`namei+0x59d
              kernel`vn_open_cred+0x21c
              kernel`kern_openat+0x25f
              kernel`amd64_syscall+0x51e
              kernel`0xffffffff80fc867b


$ sudo dtrace -n "fbt:::return /arg1==EINVAL/ { @[stack()] = count(); }" -c
"touch 'testdir/234test™'"
dtrace: description 'fbt:::return ' matched 30012 probes
touch: 'testdir/234test™': No such file or directory
dtrace: pid 12964 exited with status 1


              kernel`cache_lookup+0xba7
              kernel`vfs_cache_lookup+0xac
              kernel`VOP_LOOKUP_APV+0x87
              kernel`lookup+0x711
              kernel`namei+0x59d
              kernel`vn_open_cred+0x21c
              kernel`kern_openat+0x25f
              kernel`amd64_syscall+0x51e
              kernel`0xffffffff80fc867b
                1

              kernel`vn_open_cred+0x10f
              kernel`kern_openat+0x25f
              kernel`amd64_syscall+0x51e
              kernel`0xffffffff80fc867b
                1

              ... (irrelevant frames elided)



Ok, this also seems to work:

$ sudo mount_msdosfs -L en_US.UTF-8 /dev/md1 ./testdir
$ touch 'testdir/234test™'
$ ls testdir
234test™

Does mounting your USB stick with -L <lang>.UTF-8 work?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list