Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Mar 2017 18:02:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-fs@FreeBSD.org
Subject:   [Bug 217440] FAT32 formatted USB stick with files written by PS4 - Invalid argument, unable to list directory contents
Message-ID:  <bug-217440-3630-h8YCulhPmE@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-217440-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-217440-3630@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217440

--- Comment #4 from Conrad Meyer <cem@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=3D/dev/zero of=3D./testfs bs=3D1m count=3D64
$ 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=3D512 SecPerClust=3D1 ResSectors=3D32 FATs=3D2 Media=3D0xf0 Sec=
PerTrack=3D63
Heads=3D16 HiddenSecs=3D0 HugeSectors=3D131072 FATsecs=3D1008 RootCluster=
=3D2 FSInfo=3D1
Backup=3D2
$ mkdir testdir
$ sudo mount_msdosfs /dev/md1 ./testdir

$ touch "testdir/test=E2=84=A2"
touch: testdir/test=E2=84=A2: Invalid argument

$ sudo dtrace -n "fbt:::return /arg1=3D=3DEINVAL/ { stack(); }" -c "touch
'testdir/test=E2=84=A2'"                                                   =
 =E2=8F=8E
dtrace: description 'fbt:::return ' matched 30012 probes
touch: 'testdir/test=E2=84=A2': No such file or directory         <<< diffe=
rent error?=20
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=3D=3DEINVAL/ { @[stack()] =3D count();=
 }" -c
"touch 'testdir/234test=E2=84=A2'"
dtrace: description 'fbt:::return ' matched 30012 probes
touch: 'testdir/234test=E2=84=A2': 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=E2=84=A2'
$ ls testdir
234test=E2=84=A2

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217440-3630-h8YCulhPmE>