Subject: kern/31287: msdosfs now can mount >128MB filesystems
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <fab@gnux.info>
List: netbsd-bugs
Date: 09/10/2005 14:42:01
>Number:         31287
>Category:       kern
>Synopsis:       msdosfs now can mount >128MB filesystems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 10 14:42:00 +0000 2005
>Originator:     Fabien Devaux
>Release:        3.99.8
>Organization:
>Environment:
NetBSD twin.localzone.fr 3.99.8 NetBSD 3.99.8 (MONKERN) #2: Sat Sep 10 16:12:53 CEST 2005  root@twin.localzone.fr:/usr/BUILD/obj/sys/arch/i386/compile/MONKERN i386
>Description:
This is a fix for the bug : kern/23773
(only work on recent systems where struct dirent uses inode_t)

>How-To-Repeat:
mount a msdos filesystem >128MB
>Fix:
Index: msdosfs_vfsops.c
===================================================================
RCS file: /pub/NetBSD-CVS/src/sys/fs/msdosfs/msdosfs_vfsops.c,v
retrieving revision 1.26
diff -r1.26 msdosfs_vfsops.c
444d443
<       u_long  dirsperblk;
534,543d532
<       dirsperblk = pmp->pm_BytesPerSec / sizeof(struct direntry);
<       if (pmp->pm_HugeSectors > 0xffffffff / dirsperblk + 1) {
<               /*
<                * We cannot deal currently with this size of disk
<                * due to fileid limitations (see msdosfs_getattr and
<                * msdosfs_readdir)
<                */
<               error = EINVAL;
<               goto error_exit;
<       }