summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_physio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-09-22 19:56:14 +0000
committerphk <phk@FreeBSD.org>1999-09-22 19:56:14 +0000
commit56948f82f5dc2d74432bc167dc307d2efa804e97 (patch)
treeaa1cec6687b5942804ab9aee76ca908bc41463a7 /sys/kern/kern_physio.c
parent9e9ee6a9d861a3edf3d0726e5344af5760250c3b (diff)
downloadFreeBSD-src-56948f82f5dc2d74432bc167dc307d2efa804e97.zip
FreeBSD-src-56948f82f5dc2d74432bc167dc307d2efa804e97.tar.gz
Kill the cdevsw->d_maxio field.
d_maxio is replaced by the dev->si_iosize_max field which the driver should be set in all calls to cdevsw->d_open if it has a better idea than the system wide default. The field is a generic dev_t field (ie: not disk specific) so that tapes and other devices can use physio as well.
Diffstat (limited to 'sys/kern/kern_physio.c')
-rw-r--r--sys/kern/kern_physio.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c
index cc436bf..01bc7f3 100644
--- a/sys/kern/kern_physio.c
+++ b/sys/kern/kern_physio.c
@@ -172,14 +172,9 @@ u_int
minphys(bp)
struct buf *bp;
{
- u_int maxphys = DFLTPHYS;
- struct cdevsw *bdsw;
+ u_int maxphys;
- bdsw = devsw(bp->b_dev);
-
- if (bdsw && bdsw->d_maxio) {
- maxphys = bdsw->d_maxio;
- }
+ maxphys = bp->b_dev->si_iosize_max;
if (bp->b_kvasize && (bp->b_kvasize < maxphys))
maxphys = bp->b_kvasize;
OpenPOWER on IntegriCloud