diff options
| author | Julian Elischer <julian@FreeBSD.org> | 1999-09-09 19:08:44 +0000 |
|---|---|---|
| committer | Julian Elischer <julian@FreeBSD.org> | 1999-09-09 19:08:44 +0000 |
| commit | 85a219d2017d0e1ffc28eb51592f30df7f2a699e (patch) | |
| tree | f064986d23dd12f01ceb3008f3ffa3619df89a74 /sys/fs | |
| parent | 3113e9d141bfaf3ef4f385a17cfcc46f0d5c80ec (diff) | |
Notes
Diffstat (limited to 'sys/fs')
| -rw-r--r-- | sys/fs/specfs/spec_vnops.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 9d85bfe50886..7b2d712fc76b 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -234,8 +234,6 @@ spec_open(ap) if (vn_isdisk(vp)) { if (!dev->si_bsize_phys) dev->si_bsize_phys = DEV_BSIZE; - if (dev->si_bsize_best < dev->si_bsize_phys) - dev->si_bsize_best = BLKDEV_IOSIZE; if (!dev->si_bsize_max) dev->si_bsize_max = MAXBSIZE; } @@ -296,6 +294,10 @@ spec_read(ap) */ bsize = vp->v_rdev->si_bsize_best; + if (bsize < vp->v_rdev->si_bsize_phys) + bsize = vp->v_rdev->si_bsize_phys; + if (bsize < BLKDEV_IOSIZE) + bsize = BLKDEV_IOSIZE; if ((ioctl = devsw(dev)->d_ioctl) != NULL && (*ioctl)(dev, DIOCGPART, (caddr_t)&dpart, FREAD, p) == 0 && @@ -380,6 +382,10 @@ spec_write(ap) * be larger then the physical minimum. */ bsize = vp->v_rdev->si_bsize_best; + if (bsize < vp->v_rdev->si_bsize_phys) + bsize = vp->v_rdev->si_bsize_phys; + if (bsize < BLKDEV_IOSIZE) + bsize = BLKDEV_IOSIZE; if ((*devsw(vp->v_rdev)->d_ioctl)(vp->v_rdev, DIOCGPART, (caddr_t)&dpart, FREAD, p) == 0) { |
