Subject: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <tobi@holmes.physcip.uni-stuttgart.de>
List: netbsd-bugs
Date: 07/20/1999 07:39:06
>Number:         8037
>Category:       port-alpha
>Synopsis:       msdosfs on DEC Alpha does not work correctly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-alpha-maintainer (NetBSD/alpha Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 20 06:20:00 1999
>Last-Modified:
>Originator:     Tobias Ernst
>Organization:
University of Stuttgart, Germany
>Release:        NetBSD 1.4 Release
>Environment:
DEC 3000, NetBSD 1.4 Release
System: NetBSD holmes 1.4 NetBSD 1.4 (HOLMES) #0: Mon May 10 17:03:43 PDT 1999 root@holmes:/usr/src/sys/arch/alpha/compile/HOLMES alpha

>Description:
We have a DEC 3000 with SCSI floppy and SCSI zip disk and want to mount
FAT / MSDOS formatted media into the filesystem. However, the NetBSD 
msdos file system is not able to handle these volumes properly. It can read
the root directory and its contents, and we can copy off files from the 
root directory.

However, all subdirectories on the disk are shown as empty, not even
containing "." and "..". In addition, we cannot copy anything onto the
disk, neither to the root directory nor to any subdirectories, nor can we
create subdirectories.

Here is what NetBSD probes on our hardware, in case it is important (in this
example, only the SCSI floppy was attached):

tcds0 at tc0 slot 2 offset 0x0: TurboChannel Dual SCSI (baseboard)
asc0 at tcds0 chip 0: NCR53C94, 25MHz, SCSI ID 7
scsibus0 at asc0: 8 targets, 8 luns per target
probe(asc0:3:0): max sync rate 5.00Mb/s
sd0 at scsibus0 targ 3 lun 0: <DEC, RZ26L    (C) DEC, 440C> SCSI2 0/direct fixed
sd0: 1001MB, 3117 cyl, 8 head, 82 sec, 512 bytes/sect x 2050860 sectors
sd1 at scsibus0 targ 5 lun 0: <DEC, RX33     (C) DEC, 0070> SCSI1 0/direct remov
able
sd1: 1MB, 80 cyl, 2 head, 18 sec, 512 bytes/sect x 2880 sectors

>How-To-Repeat:
We use
  mount -t msdos /dev/sd1c /mnt
to mount the SCSI diskette resp.
  mbrlabel sd2
  mount -t msdos /dev/sd2a /mnt
  (or: mount -t msdos /dev/sd2d /mnt)
to mount the ZIP. Then,
  ls /mnt
will show the contents of the root directory, but
  ls /mnt/test
(given that test is a subdirectory that has been created and populated 
with a DOS PC or with mtools) will show nothing at all, even if there are
files in the subdirectory. The following command:
  cp testfile /mnt
will result in
  cp: /mnt/testfile: Argument list too long
and an entry for testfile will be found in /mnt, but with 0 bytes length.
  mkdir /mnt/test2
will yield
  mkdir: /mnt/test2: Is a directory
and the subdiretory will be created, but with zero length and zero contents.

>Fix:
An experienced person would need to check the msdosfs source code for 
64bit glitches or other alpha specific things. In case it is not Alpha 
generic, but only happens on our machine, I could provide accounts if 
necessary, as it is not yet in production.

>Audit-Trail:
>Unformatted: