summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-09-20 19:57:28 +0000
committerphk <phk@FreeBSD.org>1999-09-20 19:57:28 +0000
commit3ea30afc2df519befce9b302ed4959d17a6392e6 (patch)
treef5b84884151162e62383cc75887209758a02a78c /sys/fs
parentc0818069f7d5c0aa756e24c5d4605e5c1da60edc (diff)
downloadFreeBSD-src-3ea30afc2df519befce9b302ed4959d17a6392e6.zip
FreeBSD-src-3ea30afc2df519befce9b302ed4959d17a6392e6.tar.gz
Step one of replacing devsw->d_maxio with si_bsize_max.
Rename dev->si_bsize_max to si_iosize_max and set it in spec_open if the device didn't. Set vp->v_maxio from dev->si_bsize_max in spec_open rather than in ufs_bmap.c
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/specfs/spec_vnops.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index 46b4eb5..7509c5e 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -158,7 +158,7 @@ spec_open(ap)
struct proc *p = ap->a_p;
struct vnode *bvp, *vp = ap->a_vp;
dev_t bdev, dev = vp->v_rdev;
- int error;
+ int error, maxio;
struct cdevsw *dsw;
/*
@@ -233,8 +233,14 @@ spec_open(ap)
if (vn_isdisk(vp)) {
if (!dev->si_bsize_phys)
dev->si_bsize_phys = DEV_BSIZE;
- if (!dev->si_bsize_max)
- dev->si_bsize_max = MAXBSIZE;
+ maxio = dev->si_iosize_max;
+ if (!maxio)
+ maxio = devsw(dev)->d_maxio; /* XXX */
+ if (!maxio)
+ maxio = DFLTPHYS;
+ if (maxio > MAXPHYS)
+ maxio = MAXPHYS;
+ vp->v_maxio = maxio;
}
return (error);
OpenPOWER on IntegriCloud