1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-27 16:39:08 +00:00

Oops, the redundant tests for major numbers weren't redundant here.

They checked for the magic major number for the "device" behind mfs
mount points.  Use a more obvious check for this device.

Debugged by:		Andrew Gallatin <gallatin@cs.duke.edu>
This commit is contained in:
Bruce Evans 1998-10-27 11:47:08 +00:00
parent 45a576b57a
commit b5ee16407f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40672
4 changed files with 14 additions and 13 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95
* $Id: ufs_bmap.c,v 1.22 1998/08/18 03:54:39 bde Exp $
* $Id: ufs_bmap.c,v 1.23 1998/10/26 08:53:13 bde Exp $
*/
#include <sys/param.h>
@ -149,7 +149,8 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb)
*/
devvp = ip->i_devvp;
if (devvp != NULL && devvp->v_type == VBLK) {
if (devvp != NULL && devvp->v_tag != VT_MFS &&
devvp->v_type == VBLK) {
if (bdevsw[major(devvp->v_rdev)]->d_maxio > MAXPHYS) {
maxrun = MAXPHYS;
vp->v_maxio = MAXPHYS;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95
* $Id: ufs_bmap.c,v 1.22 1998/08/18 03:54:39 bde Exp $
* $Id: ufs_bmap.c,v 1.23 1998/10/26 08:53:13 bde Exp $
*/
#include <sys/param.h>
@ -149,7 +149,8 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb)
*/
devvp = ip->i_devvp;
if (devvp != NULL && devvp->v_type == VBLK) {
if (devvp != NULL && devvp->v_tag != VT_MFS &&
devvp->v_type == VBLK) {
if (bdevsw[major(devvp->v_rdev)]->d_maxio > MAXPHYS) {
maxrun = MAXPHYS;
vp->v_maxio = MAXPHYS;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95
* $Id: ffs_vfsops.c,v 1.89 1998/10/25 17:44:57 phk Exp $
* $Id: ffs_vfsops.c,v 1.90 1998/10/25 19:02:48 bde Exp $
*/
#include "opt_quota.h"
@ -453,13 +453,12 @@ ffs_reload(mp, cred, p)
panic("ffs_reload: dirty1");
dev = devvp->v_rdev;
/*
* Only VMIO the backing device if the backing device is a real
* block device. This excludes the original MFS implementation.
* Note that it is optional that the backing device be VMIOed. This
* increases the opportunity for metadata caching.
* block device. See ffs_mountmfs() for more details.
*/
if (devvp->v_type == VBLK) {
if (devvp->v_tag != VT_MFS && devvp->v_type == VBLK) {
simple_lock(&devvp->v_interlock);
vfs_object_create(devvp, p, p->p_ucred, 0);
}
@ -614,12 +613,11 @@ ffs_mountfs(devvp, mp, p, malloctype)
* Note that it is optional that the backing device be VMIOed. This
* increases the opportunity for metadata caching.
*/
if (devvp->v_type == VBLK) {
if (devvp->v_tag != VT_MFS && devvp->v_type == VBLK) {
simple_lock(&devvp->v_interlock);
vfs_object_create(devvp, p, p->p_ucred, 0);
}
ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p);
if (error)

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95
* $Id: ufs_bmap.c,v 1.22 1998/08/18 03:54:39 bde Exp $
* $Id: ufs_bmap.c,v 1.23 1998/10/26 08:53:13 bde Exp $
*/
#include <sys/param.h>
@ -149,7 +149,8 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb)
*/
devvp = ip->i_devvp;
if (devvp != NULL && devvp->v_type == VBLK) {
if (devvp != NULL && devvp->v_tag != VT_MFS &&
devvp->v_type == VBLK) {
if (bdevsw[major(devvp->v_rdev)]->d_maxio > MAXPHYS) {
maxrun = MAXPHYS;
vp->v_maxio = MAXPHYS;