Subject: kern/10119: Argument list too long error when mounting NTFS partition
To: None <gnats-bugs@gnats.netbsd.org>
From: Sean Doran <smd@ebone.net>
List: netbsd-bugs
Date: 05/14/2000 09:06:10
>Number:         10119
>Category:       kern
>Synopsis:       Argument list too long error when mounting NTFS partition
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 14 09:07:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Sean Doran
>Release:        -current i386 cvs of 2000 05 11
>Organization:
	
>Environment:
	
System: NetBSD newlaptoy.smd.ebone.net 1.4Y NetBSD 1.4Y (NLAPTOY) #6: Thu May 11 20:46:20 CEST 2000 root@newlaptoy.smd.ebone.net:/usr/src/sys/arch/i386/compile/NLAPTOY i386

newlaptoy# fdisk sd0
NetBSD disklabel disk geometry:
cylinders: 4811 heads: 22 sectors/track: 167 (3674 sectors/cylinder)

BIOS disk geometry:
cylinders: 4811 heads: 22 sectors/track: 167 (3674 sectors/cylinder)

Partition table:
0: sysid 7 (OS/2 HPFS or NTFS or QNX2 or Advanced UNIX)
    start 63, size 12292497 (6002 MB), flag 0x80
        beg: cylinder    0, head   0, sector  0
        end: cylinder 1023, head  18, sector 24
1: sysid 169 (NetBSD)
    start 12292560, size 5473440 (2672 MB), flag 0x0
        beg: cylinder 1023, head  18, sector 25
        end: cylinder 1023, head  13, sector 39
2: <UNUSED>
3: <UNUSED>

disklabel sd0
# /dev/rsd0d:
type: SCSI
disk: 3391SS
label: smd ntfs dvd
flags:
bytes/sector: 512
sectors/track: 167
tracks/cylinder: 22
sectors/cylinder: 3674
cylinders: 4811
total sectors: 17780058
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

5 partitions:
#        size   offset     fstype   [fsize bsize   cpg]
  a:  5473440 12292560     4.2BSD     4096 32768    16   # (Cyl. 3345*- 4835*)
  c:  5473440 12292560     unused        0     0         # (Cyl. 3345*- 4835*)
  d: 17780058        0     unused        0     0         # (Cyl.    0 - 4839*)
  e: 12292497       63       NTFS                        # (Cyl.    0*- 3345*)

pcmcia1: CIS version PCMCIA 2.0 or 2.1
pcmcia1: CIS info: Adaptec, Inc., APA-1460 SCSI Host Adapter, Version 0.01
pcmcia1: Manufacturer code 0x12f, product 0x2
pcmcia1: function 0: unspecified, ccr addr 2000 mask 1
pcmcia1: function 0, config table entry 9: I/O card; irq mask 1e00; iomask a, io
space 340-35f; io16 irqlevel
pcmcia1: function 0, config table entry 8: I/O card; irq mask 1e00; iomask a, io
space 140-15f; io16 irqlevel
aic0 at pcmcia1 function 0: Adaptec APA-1460A SlimSCSI
scsibus0 at aic0: 8 targets, 8 luns per target
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 2 lun 0: <MICROP, 3391SS, p43D> SCSI2 0/direct fixed
sd0: 8681 MB, 4811 cyl, 22 head, 167 sec, 512 bytes/sect x 17780058 sectors
cd1 at scsibus0 target 3 lun 0: <TOSHIBA, SD-W1101 DVD-RAM, 1033> SCSI2 5/cdrom 
removable

>Description:
	when doing a mount_ntfs of sd0e, I get a userland error:

newlaptoy# !mou
mount_ntfs -o ro -i /dev/sd0e /mnt
mount_ntfs: /dev/sd0e on /mnt: Argument list too long
newlaptoy# mount_ntfs -o ro -a /dev/sd0e /mnt
mount_ntfs: /dev/sd0e on /mnt: Argument list too long
newlaptoy# mount_ntfs /dev/sd0e /mnt
mount_ntfs: /dev/sd0e on /mnt: Argument list too long

etc.

I also get a kernel printf:

ntfs_readntvattr_plain: POSSIBLE RUN ERROR
ntfs_readattr_plain: ntfs_readntvattr_plain failed: o: 0, s: 192072
ntfs_readattr_plain: attrib: 0 - 46
ntfs_readntvattr_plain: POSSIBLE RUN ERROR
ntfs_readattr_plain: ntfs_readntvattr_plain failed: o: 0, s: 192072
ntfs_readattr_plain: attrib: 0 - 46
ntfs_readntvattr_plain: POSSIBLE RUN ERROR
ntfs_readattr_plain: ntfs_readntvattr_plain failed: o: 0, s: 192072
ntfs_readattr_plain: attrib: 0 - 46
ntfs_readntvattr_plain: POSSIBLE RUN ERROR
ntfs_readattr_plain: ntfs_readntvattr_plain failed: o: 0, s: 192072
ntfs_readattr_plain: attrib: 0 - 46

The filesystem was created under NT 4.0 SP 6 & runs OK under NT.

An NTFS filesystem on wd0 mounts just fine.  It was created in
the past under NT 4.0 SP 4.  It is also much smaller:
% disklabel wd0 | grep NT
  g:  4188240       63       NTFS                        # (Cyl.    0*- 4432*)

>How-To-Repeat:
	1. create and format new filesystem on NT 4.0
	2. boot netbsd, do fdisk to create netbsd partition, 
           do disklabel to set things up OK
	3. newfs netbsd partition, mount it, things are OK
	4. try to mount NTFS partition, it fails as above.
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: