diff options
author | phk <phk@FreeBSD.org> | 1999-05-07 10:11:40 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-05-07 10:11:40 +0000 |
commit | 693dd58bb3e5843d252e25a15e2cc8d49323cb82 (patch) | |
tree | a0fbea49edf11184c1bafaed7d5b3cd858742449 /sys/ufs | |
parent | cfcd3ae08c30d66088e1ad5ffa68aa05b60e1bfe (diff) | |
download | FreeBSD-src-693dd58bb3e5843d252e25a15e2cc8d49323cb82.zip FreeBSD-src-693dd58bb3e5843d252e25a15e2cc8d49323cb82.tar.gz |
Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline)
function.
Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
to the order of the cmaj/bmaj arguments!)
Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
(ditto!)
(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 16 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_bmap.c | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index cffe980..184f866 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 - * $Id: ffs_vfsops.c,v 1.95 1999/01/07 16:14:17 bde Exp $ + * $Id: ffs_vfsops.c,v 1.96 1999/01/28 00:57:54 dillon Exp $ */ #include "opt_quota.h" @@ -158,9 +158,9 @@ ffs_mount( mp, path, data, ndp, p) return (err); } - if (bdevsw[major(rootdev)]->d_flags & D_NOCLUSTERR) + if (bdevsw(major(rootdev))->d_flags & D_NOCLUSTERR) mp->mnt_flag |= MNT_NOCLUSTERR; - if (bdevsw[major(rootdev)]->d_flags & D_NOCLUSTERW) + if (bdevsw(major(rootdev))->d_flags & D_NOCLUSTERW) mp->mnt_flag |= MNT_NOCLUSTERW; if( ( err = ffs_mountfs(rootvp, mp, p, M_FFSNODE)) != 0) { /* fs specific cleanup (if any)*/ @@ -194,9 +194,9 @@ ffs_mount( mp, path, data, ndp, p) devvp = ump->um_devvp; err = 0; ronly = fs->fs_ronly; /* MNT_RELOAD might change this */ - if (bdevsw[major(ump->um_dev)]->d_flags & D_NOCLUSTERR) + if (bdevsw(major(ump->um_dev))->d_flags & D_NOCLUSTERR) mp->mnt_flag |= MNT_NOCLUSTERR; - if (bdevsw[major(ump->um_dev)]->d_flags & D_NOCLUSTERW) + if (bdevsw(major(ump->um_dev))->d_flags & D_NOCLUSTERW) mp->mnt_flag |= MNT_NOCLUSTERW; if (ronly == 0 && (mp->mnt_flag & MNT_RDONLY)) { flags = WRITECLOSE; @@ -291,7 +291,7 @@ ffs_mount( mp, path, data, ndp, p) goto error_2; } if (major(devvp->v_rdev) >= nblkdev || - bdevsw[major(devvp->v_rdev)] == NULL) { + bdevsw(major(devvp->v_rdev)) == NULL) { err = ENXIO; goto error_2; } @@ -347,9 +347,9 @@ ffs_mount( mp, path, data, ndp, p) ******************** */ - if (bdevsw[major(devvp->v_rdev)]->d_flags & D_NOCLUSTERR) + if (bdevsw(major(devvp->v_rdev))->d_flags & D_NOCLUSTERR) mp->mnt_flag |= MNT_NOCLUSTERR; - if (bdevsw[major(devvp->v_rdev)]->d_flags & D_NOCLUSTERW) + if (bdevsw(major(devvp->v_rdev))->d_flags & D_NOCLUSTERW) mp->mnt_flag |= MNT_NOCLUSTERW; /* diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index 3ea5965..88f4c24 100644 --- a/sys/ufs/ufs/ufs_bmap.c +++ b/sys/ufs/ufs/ufs_bmap.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95 - * $Id: ufs_bmap.c,v 1.25 1999/01/28 00:57:55 dillon Exp $ + * $Id: ufs_bmap.c,v 1.26 1999/05/02 23:57:04 alc Exp $ */ #include <sys/param.h> @@ -151,12 +151,12 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb) if (devvp != NULL && devvp->v_tag != VT_MFS && devvp->v_type == VBLK) { - if (bdevsw[major(devvp->v_rdev)]->d_maxio > MAXPHYS) { + if (bdevsw(major(devvp->v_rdev))->d_maxio > MAXPHYS) { maxrun = MAXPHYS; vp->v_maxio = MAXPHYS; } else { - maxrun = bdevsw[major(devvp->v_rdev)]->d_maxio; - vp->v_maxio = bdevsw[major(devvp->v_rdev)]->d_maxio; + maxrun = bdevsw(major(devvp->v_rdev))->d_maxio; + vp->v_maxio = bdevsw(major(devvp->v_rdev))->d_maxio; } maxrun = maxrun / blksize; maxrun -= 1; |