diff options
author | phk <phk@FreeBSD.org> | 1999-08-31 21:46:42 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-08-31 21:46:42 +0000 |
commit | 27ac949931e50932fb2c3393af0f643b211faabe (patch) | |
tree | 0cfebcc108a447b96764606a0705259c7a885d7d /sys/miscfs | |
parent | 06a6c50517f44cfc4d72a6688a9a523e64de4866 (diff) | |
download | FreeBSD-src-27ac949931e50932fb2c3393af0f643b211faabe.zip FreeBSD-src-27ac949931e50932fb2c3393af0f643b211faabe.tar.gz |
Set the buffersize for non BSDFFS labeled partitions to
max(dev->si_bsize_phys, BLKDEV_IOSIZE).
Requested by: davidg
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index d16b9e6..8fd4539 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -288,8 +288,8 @@ if (bdev_access) { return (EINVAL); bsize = dev->si_bsize_phys; - while (bsize < dev->si_bsize_max && bsize < uio->uio_resid) - bsize <<= 1; + if (bsize < BLKDEV_IOSIZE) + bsize = BLKDEV_IOSIZE; if ((ioctl = devsw(dev)->d_ioctl) != NULL && (*ioctl)(dev, DIOCGPART, (caddr_t)&dpart, FREAD, p) == 0 && @@ -372,8 +372,8 @@ if (bdev_access) { return (EINVAL); bsize = dev->si_bsize_phys; - while (bsize < dev->si_bsize_max && bsize < uio->uio_resid) - bsize <<= 1; + if (bsize < BLKDEV_IOSIZE) + bsize = BLKDEV_IOSIZE; if ((*devsw(dev)->d_ioctl)(dev, DIOCGPART, (caddr_t)&dpart, FREAD, p) == 0) { |