Forgotten commit: If a provider has zero sectorsize, it is an
indication of lack of media. Tripped up: peter
This commit is contained in:
parent
7029afbd0e
commit
24c4f38c89
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user