diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-10-22 06:32:20 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-10-22 06:32:20 +0000 |
commit | 43bff1a7abde6d664c59156c6961f74669c98c0e (patch) | |
tree | 527546210fd616e80e3328cd88903c94f959b8dc /sys/geom | |
parent | 04e22a026d05ecb4680b06a7860a417f0e2b2d6b (diff) | |
download | src-43bff1a7abde6d664c59156c6961f74669c98c0e.tar.gz src-43bff1a7abde6d664c59156c6961f74669c98c0e.zip |
Forgotten commit: If a provider has zero sectorsize, it is an
indication of lack of media.
Tripped up: peter
Notes
Notes:
svn path=/head/; revision=121323
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_io.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index a01f63b8b4be..b9ec5135d68f 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -209,12 +209,9 @@ g_io_check(struct bio *bp) case BIO_READ: case BIO_WRITE: case BIO_DELETE: - /* Noisily reject zero size sectors */ - if (pp->sectorsize == 0) { - printf("GEOM provider %s has zero sectorsize\n", - pp->name); - return (EDOOFUS); - } + /* Zero sectorsize is a probably lack of media */ + if (pp->sectorsize == 0) + return (ENXIO); /* Reject I/O not on sector boundary */ if (bp->bio_offset % pp->sectorsize) return (EINVAL); |