Subject: kern/3459: msdosfs_mountfs fails for bigger sector size than 512 bytes
To: None <gnats-bugs@gnats.netbsd.org>
From: None <koji@math.human.nagoya-u.ac.jp>
List: netbsd-bugs
Date: 04/08/1997 09:56:56
>Number:         3459
>Category:       kern
>Synopsis:       msdosfs_mountfs fails for bigger sector size than 512 bytes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr  7 18:35:01 1997
>Last-Modified:
>Originator:     Koji Imada - je4owb/2
>Organization:
Mathematics Group of Graduate School of Human
	Infomatics, Nagoya University, Japan.
>Release:        970330
>Environment:
	
System: NetBSD bimota 1.2D NetBSD 1.2D (BIMOTA) #3: Mon Mar 31 01:14:23 JST 1997 koji@bimota:/usr/local/work/current/src/sys/arch/i386/compile/BIMOTA i386


>Description:
	msdosfs_mountfs fails for media which has bigger sector size
	than 512 bytes.
>How-To-Repeat:
	Modify device drivers to support non-512 bytes/sector
	media. then try to mount non-512 bytes/sector media(Japanese
	1.2MB format floppy or 640MB MO).
>Fix:
Index: sys/msdosfs/msdosfs_vfsops.c
===================================================================
RCS file: /mnt2/NetBSD/cvsroot/netbsd/sys/msdosfs/msdosfs_vfsops.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 msdosfs_vfsops.c
*** msdosfs_vfsops.c	1997/04/01 07:16:20	1.1.1.2
--- msdosfs_vfsops.c	1997/04/08 00:14:29
***************
*** 316,322 ****
  	 * Read the boot sector of the filesystem, and then check the
  	 * boot signature.  If not a dos boot sector then error out.
  	 */
! 	if ((error = bread(devvp, 0, 512, NOCRED, &bp)) != 0)
  		goto error_exit;
  	bp->b_flags |= B_AGE;
  	bsp = (union bootsector *)bp->b_data;
--- 316,322 ----
  	 * Read the boot sector of the filesystem, and then check the
  	 * boot signature.  If not a dos boot sector then error out.
  	 */
! 	if ((error = bread(devvp, 0, BLKDEV_IOSIZE, NOCRED, &bp)) != 0)
  		goto error_exit;
  	bp->b_flags |= B_AGE;
  	bsp = (union bootsector *)bp->b_data;
>Audit-Trail:
>Unformatted: