aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom_io.c
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2004-09-28 08:34:27 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2004-09-28 08:34:27 +0000
commit8dd5480d292602aaf978bd5470f4b011314eb494 (patch)
tree5a9c3c2732fdc614e03de0d4f5804e7df55399e6 /sys/geom/geom_io.c
parent604fce4f60a91dab20eb26c72829e2b8d7b3accd (diff)
downloadsrc-8dd5480d292602aaf978bd5470f4b011314eb494.tar.gz
src-8dd5480d292602aaf978bd5470f4b011314eb494.zip
- Set maximum request size to MAXPHYS (128kB), instead of DFLPHYS (64kB).
- Set minimum request size to sectorsize, instead of 512 bytes. Approved by: phk (some time ago)
Notes
Notes: svn path=/head/; revision=135873
Diffstat (limited to 'sys/geom/geom_io.c')
-rw-r--r--sys/geom/geom_io.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index f48a33efaa96..12bce638119d 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -466,8 +466,9 @@ g_read_data(struct g_consumer *cp, off_t offset, off_t length, int *error)
void *ptr;
int errorc;
- KASSERT(length >= 512 && length <= DFLTPHYS,
- ("g_read_data(): invalid length %jd", (intmax_t)length));
+ KASSERT(length > 0 && length >= cp->provider->sectorsize &&
+ length <= MAXPHYS, ("g_read_data(): invalid length %jd",
+ (intmax_t)length));
bp = g_alloc_bio();
bp->bio_cmd = BIO_READ;
@@ -494,8 +495,9 @@ g_write_data(struct g_consumer *cp, off_t offset, void *ptr, off_t length)
struct bio *bp;
int error;
- KASSERT(length >= 512 && length <= DFLTPHYS,
- ("g_write_data(): invalid length %jd", (intmax_t)length));
+ KASSERT(length > 0 && length >= cp->provider->sectorsize &&
+ length <= MAXPHYS, ("g_write_data(): invalid length %jd",
+ (intmax_t)length));
bp = g_alloc_bio();
bp->bio_cmd = BIO_WRITE;