Date: Fri, 1 Feb 2013 18:01:04 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246216 - head/sys/fs/msdosfs Message-ID: <201302011801.r11I14Tq009558@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Feb 1 18:01:03 2013 New Revision: 246216 URL: http://svnweb.freebsd.org/changeset/base/246216 Log: The mountmsdosfs() function had an insane sanity test, remove it. Trying FAT32 on a small partition failed to mount because pmp->pm_Sectors was nonzero. Normally, FAT32 file systems are so large that the 16-bit pm_Sectors can't hold the size. This is indicated by setting it to 0 and using only pm_HugeSectors. But at least old versions of newfs_msdos use the 16-bit field if possible, and msdosfs supports this except for breaking its own support in the sanity check. This is quite different from the handling of pm_FATsecs -- now the 16-bit value is always ignored for FAT32 except for checking that it is 0, and newfs_msdos doesn't use the 16-bit value for FAT32. Submitted by: bde MFC after: 1 week Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Fri Feb 1 17:58:37 2013 (r246215) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Fri Feb 1 18:01:03 2013 (r246216) @@ -553,8 +553,7 @@ mountmsdosfs(struct vnode *devvp, struct } if (pmp->pm_RootDirEnts == 0) { - if (pmp->pm_Sectors - || pmp->pm_FATsecs + if (pmp->pm_FATsecs || getushort(b710->bpbFSVers)) { error = EINVAL; #ifdef MSDOSFS_DEBUG
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302011801.r11I14Tq009558>