Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Sep 2004 18:53:49 GMT
From:      Peter Pentchev <roam@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/71774: NTFS cannot "see" files on a WinXP filesystem
Message-ID:  <200409151853.i8FIrnQA063972@freefall.freebsd.org>
Resent-Message-ID: <200409151900.i8FJ0boZ065156@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         71774
>Category:       kern
>Synopsis:       NTFS cannot "see" files on a WinXP filesystem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 15 19:00:37 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Peter Pentchev
>Release:        FreeBSD 5.3-BETA4 i386
>Organization:
uh.. let me check my notes..
>Environment:
System: FreeBSD straylight.m.ringlet.net 5.3-BETA4 FreeBSD 5.3-BETA4 #5: Wed Sep 15 12:53:07 EEST 2004     roam@straylight.m.ringlet.net:/fs/5/usr.obj/fs/5/usr.src/sys/WAYLIGHT  i386

This is a 5.x machine CVSup'd and rebuilt every day.
The other partition 'at fault' is a WinXP-style NTFS filesystem, formatted
during the WinXP SP1 installation some time ago.  So far, I've only
seen the problem in WinXP's special 'My Pictures' directory.

>Description:

Sometimes then I transfer files between my Canon PowerShot digital
camera and WinXP (gphoto mostly works, but there are unrelated reasons
for using WinXP some of the time).  Microsoft's Scanner and Camera
Wizard tranfers the pictures and places them into a folder of my choice,
usually within My Documents/My Pictures.

So far the problem has only appeared once, but it had me stumped for a
couple of hours: I had transferred a set of 6 pictures, then, a couple
of days later, tried to access them from FreeBSD, and could not find
them in the directory where I could swear I'd put them before. An 'ls'
on that directory comes up with, well, nothing - no files, no subdirs,
no nothing (well, '.' and '..' are there alright).  The funny part is,
the directory seems to contain DOS-style 8.3 names only, and no NTFS
(type 2) names at all!  A couple of debugging printf's in ntfs_vnops.c
revealed that ntfs_readdir() never sees the directory because
ntfs_ntreaddir() never finds it; it's not a matter of
ntfs_nameispermitted() returning false, as seen from the mount -a case
below.

Since I know nothing about NTFS's directory organization, that's the
point where I give up.  Please tell me what other information you need,
and I'll provide it - well, short of the full 15GB raw partition dump,
since that would be a bit unwieldy to keep in GNATS, besides other
reasons ;)

>How-To-Repeat:

No, I'm not saying you can repeat that by executing the below commands;
still, that's what they do for me.  The 'My Pictures' directory is fine,
but its subdir 'mrs sarbenishka 20040910' contains six files that WinXP
can see just fine, yet FreeBSD's ntfs.ko cannot.  Further down, mounting
with NTFS_MFLAG_ALLNAMES shows six DOS-style names and that's all.

Script started on Wed Sep 15 21:35:46 2004
Starting interactive C shell
[roam@straylight ~]> sudo mount /fs/win/c
[roam@straylight ~]> ls /fs/win/c/Documents\ and\ Settings/roam.SBND/My\ Documents/My\ Pictures/
Desktop.ini			rodopi 20040905
Sample Pictures.lnk		sof 2004-06-16
mrs sarbenishka 20040910	tryn 20040912
muselica.zip			unproc
rado 2004-07-18			unproc.zip
[roam@straylight ~]> ls /fs/win/c/Documents\ and\ Settings/roam.SBND/My\ Documents/My\ Pictures/mrs\ sarbenishka\ 20040910/
[roam@straylight ~]> sudo umount /fs/win/c
[roam@straylight ~]> fgrep /fs/win/c /etc/fstab
/dev/ad0s3		/fs/win/c	ntfs	ro,noauto	0	0
[roam@straylight ~]> sudo mount_ntfs -o ro,noauto -a /dev/ad0s3 /fs/win/c
[roam@straylight ~]> ls /fs/win/c/Documents\ and\ Settings/roam.SBND/My\ Documents/My\ Pictures/mrs\ sarbenishka\ 20040910/
RO6354~1.JPG	RO6754~1.JPG	RO6F44~1.JPG
RO6364~1.JPG	RO6B54~1.JPG	RO6F54~1.JPG
[roam@straylight ~]> ls /fs/win/c/Documents\ and\ Settings/roam.SBND/My\ Documents/My\ Pictures/
Desktop.ini			mrs sarbenishka 20040910
MRSSAR~1			muselica.zip
RADO20~1			rado 2004-07-18
RODOPI~1			rodopi 20040905
SAMPLE~1.LNK			sof 2004-06-16
SOF200~1			tryn 20040912
Sample Pictures.lnk		unproc
TRYN20~1			unproc.zip
[roam@straylight ~]> sudo umount /fs/win/c
[roam@straylight ~]> exit
exit

Script done on Wed Sep 15 21:36:47 2004

>Fix:

Hopefully one can be found before 5.3 ships :)  Not critical in any way,
though.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409151853.i8FIrnQA063972>