summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_aio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-08-14 11:40:51 +0000
committerphk <phk@FreeBSD.org>1999-08-14 11:40:51 +0000
commit5f45261e990bb420f6394e615c3495668886dfe9 (patch)
tree66dfc8aa5c9515f4ec0197d4ad3f1c2445413016 /sys/kern/vfs_aio.c
parent5ff2615ae3524707b482556fcc6668d139f2cd67 (diff)
downloadFreeBSD-src-5f45261e990bb420f6394e615c3495668886dfe9.zip
FreeBSD-src-5f45261e990bb420f6394e615c3495668886dfe9.tar.gz
Spring cleaning around strategy and disklabels/slices:
Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout. please see comment in sys/conf.h about the flag argument. Remove strategy argument from all the diskslice/label/bad144 implementations, it should be found from the dev_t. Remove bogus and unused strategy1 routines. Remove open/close arguments from dssize(). Pick them up from dev_t. Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
Diffstat (limited to 'sys/kern/vfs_aio.c')
-rw-r--r--sys/kern/vfs_aio.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 3e4e821..7d5fd4f 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -13,7 +13,7 @@
* bad that happens because of using this software isn't the responsibility
* of the author. This software is distributed AS-IS.
*
- * $Id: vfs_aio.c,v 1.55 1999/08/08 18:42:48 phk Exp $
+ * $Id: vfs_aio.c,v 1.56 1999/08/13 10:10:01 phk Exp $
*/
/*
@@ -927,11 +927,8 @@ aio_qphysio(p, aiocbe)
int fd;
int s;
int cnt;
- dev_t dev;
int rw;
- d_strategy_t *fstrategy;
struct cdevsw *cdev;
- struct cdevsw *bdev;
cb = &aiocbe->uaiocb;
fdp = p->p_fd;
@@ -967,7 +964,6 @@ aio_qphysio(p, aiocbe)
if (cdev->d_bmaj == -1) {
return -1;
}
- bdev = cdev;
ki = p->p_aioinfo;
if (ki->kaio_buffer_count >= ki->kaio_ballowed_count) {
@@ -979,8 +975,6 @@ aio_qphysio(p, aiocbe)
return -1;
}
- dev = makebdev(bdev->d_bmaj, minor(vp->v_rdev));
-
/*
* Physical I/O is charged directly to the process, so we don't have
* to fake it.
@@ -1002,7 +996,7 @@ aio_qphysio(p, aiocbe)
* get a copy of the kva from the physical buffer
*/
bp->b_caller1 = p;
- bp->b_dev = dev;
+ bp->b_dev = vp->v_rdev;
error = bp->b_error = 0;
if (cb->aio_lio_opcode == LIO_WRITE) {
@@ -1041,12 +1035,11 @@ aio_qphysio(p, aiocbe)
aiocbe->jobstate = JOBST_JOBQBUF;
cb->_aiocb_private.status = cb->aio_nbytes;
num_buf_aio++;
- fstrategy = bdev->d_strategy;
bp->b_error = 0;
splx(s);
/* perform transfer */
- (*fstrategy)(bp);
+ BUF_STRATEGY(bp, 0);
s = splbio();
/*
OpenPOWER on IntegriCloud