diff options
author | bde <bde@FreeBSD.org> | 2002-03-30 15:12:57 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2002-03-30 15:12:57 +0000 |
commit | a9b7c63b296732c9bc02f0f35e74d6c6d58165c3 (patch) | |
tree | fe791bc357d13ac95ee46cc3f299fddf14d3cc8e /sys | |
parent | 938a0a2eb491ec1b69daf664d6f501b1caaa3606 (diff) | |
download | FreeBSD-src-a9b7c63b296732c9bc02f0f35e74d6c6d58165c3.zip FreeBSD-src-a9b7c63b296732c9bc02f0f35e74d6c6d58165c3.tar.gz |
In ffs_mountffs(), set mnt_iosize_max to si_iosize_max unconditionally
provided the latter is nonzero. At this point, the former is a fairly
arbitrary default value (DFTPHYS), so changing it to any reasonable
value specified by the device driver is safe. Using the maximum of
these limits broke ffs clustered i/o for devices whose si_iosize_max
is < DFLTPHYS. Using the minimum would break device drivers' ability
to increase the active limit from DFTLPHYS up to MAXPHYS.
Copied the code for this and the associated (unnecessary?) fixup of
mp_iosize_max to all other filesystems that use clustering (ext2fs and
msdosfs). It was completely missing.
PR: 36309
MFC-after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 4 | ||||
-rw-r--r-- | sys/gnu/ext2fs/ext2_vfsops.c | 5 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 5 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 4 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 2 |
5 files changed, 19 insertions, 1 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 8d4db7d..1d9e073 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -313,6 +313,10 @@ iso_mountfs(devvp, mp, td, argp) VOP_UNLOCK(devvp, 0, td); if (error) return error; + if (devvp->v_rdev->si_iosize_max != 0) + mp->mnt_iosize_max = devvp->v_rdev->si_iosize_max; + if (mp->mnt_iosize_max > MAXPHYS) + mp->mnt_iosize_max = MAXPHYS; needclose = 1; diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index 3bc7248..3bf08fe 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -651,6 +651,11 @@ ext2_mountfs(devvp, mp, td) VOP_UNLOCK(devvp, 0, td); if (error) return (error); + if (devvp->v_rdev->si_iosize_max != 0) + mp->mnt_iosize_max = devvp->v_rdev->si_iosize_max; + if (mp->mnt_iosize_max > MAXPHYS) + mp->mnt_iosize_max = MAXPHYS; + bp = NULL; ump = NULL; if ((error = bread(devvp, SBLOCK, SBSIZE, NOCRED, &bp)) != 0) diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 3bc7248..3bf08fe 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -651,6 +651,11 @@ ext2_mountfs(devvp, mp, td) VOP_UNLOCK(devvp, 0, td); if (error) return (error); + if (devvp->v_rdev->si_iosize_max != 0) + mp->mnt_iosize_max = devvp->v_rdev->si_iosize_max; + if (mp->mnt_iosize_max > MAXPHYS) + mp->mnt_iosize_max = MAXPHYS; + bp = NULL; ump = NULL; if ((error = bread(devvp, SBLOCK, SBSIZE, NOCRED, &bp)) != 0) diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 8d4db7d..1d9e073 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -313,6 +313,10 @@ iso_mountfs(devvp, mp, td, argp) VOP_UNLOCK(devvp, 0, td); if (error) return error; + if (devvp->v_rdev->si_iosize_max != 0) + mp->mnt_iosize_max = devvp->v_rdev->si_iosize_max; + if (mp->mnt_iosize_max > MAXPHYS) + mp->mnt_iosize_max = MAXPHYS; needclose = 1; diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 74b40c5..67c7772 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -603,7 +603,7 @@ ffs_mountfs(devvp, mp, td, malloctype) VOP_UNLOCK(devvp, 0, td); if (error) return (error); - if (devvp->v_rdev->si_iosize_max > mp->mnt_iosize_max) + if (devvp->v_rdev->si_iosize_max != 0) mp->mnt_iosize_max = devvp->v_rdev->si_iosize_max; if (mp->mnt_iosize_max > MAXPHYS) mp->mnt_iosize_max = MAXPHYS; |