svn commit: r342353 - head/sys/fs/msdosfs
Bruce Evans
bde at FreeBSD.org
Fri Dec 21 20:12:44 UTC 2018
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
More information about the svn-src-head
mailing list