Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Dec 2018 20:12:44 +0000 (UTC)
From:      Bruce Evans <bde@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342353 - head/sys/fs/msdosfs
Message-ID:  <201812212012.wBLKCiNc002371@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bde
Date: Fri Dec 21 20:12:43 2018
New Revision: 342353
URL: https://svnweb.freebsd.org/changeset/base/342353

Log:
  Quick fix for initialization of mnt_iosize_max.  (This limit controls
  mainly clustering and read-ahead.)  Copy the initialization from ffs,
  and also copy a couple of lines of ffs's nearby style for initialization
  order and whitespace.
  
  A correct fix would de-duplicate the initialization and fix bitrot in it
  instead of adding another instance of the duplication.  Complications to
  use the size preferred by the device have been reduced to hard-coding
  slightly pessimal and/or inconsistent defaults, using large code that was
  almost needed to support the complications.
  
  For msdosfs, the result was that mnt_iosize_max was DFTLPHYS (64K) but is
  now MAXPHYS (128K).

Modified:
  head/sys/fs/msdosfs/msdosfs_vfsops.c

Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_vfsops.c	Fri Dec 21 17:26:22 2018	(r342352)
+++ head/sys/fs/msdosfs/msdosfs_vfsops.c	Fri Dec 21 20:12:43 2018	(r342353)
@@ -418,9 +418,12 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp)
 		return (error);
 	}
 	dev_ref(dev);
-	VOP_UNLOCK(devvp, 0);
-
 	bo = &devvp->v_bufobj;
+	VOP_UNLOCK(devvp, 0);
+	if (dev->si_iosize_max != 0)
+		mp->mnt_iosize_max = dev->si_iosize_max;
+	if (mp->mnt_iosize_max > MAXPHYS)
+		mp->mnt_iosize_max = MAXPHYS;
 
 	/*
 	 * Read the boot sector of the filesystem, and then check the



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812212012.wBLKCiNc002371>