From 62104e9446341fa8b8b4742655c9df4fde6bdfa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Mon, 24 Nov 2003 14:20:19 +0000 Subject: [PATCH] Be less noisy when GEOM probes around during boot if drive contains invalid media (ie empty CD/DVD) Approved by: re@ --- sys/dev/ata/atapi-cd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index 50da0057317..1e835b94c8f 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -1000,6 +1000,11 @@ acd_geom_start(struct bio *bp) return; } + if (bp->bio_cmd == BIO_READ && cdp->disk_size == -1) { + g_io_deliver(bp, EIO); + return; + } + /* GEOM classes must do their own request limiting */ if (bp->bio_length <= cdp->iomax) { mtx_lock(&cdp->queue_mtx);