diff options
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r-- | sys/geom/geom_disk.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index 158003086463..ce4e07972b29 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -226,7 +226,11 @@ g_disk_done(struct bio *bp) if (bp2->bio_error == 0) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; + switch (bp->bio_cmd) { + case BIO_ZONE: + bcopy(&bp->bio_zone, &bp2->bio_zone, sizeof(bp->bio_zone)); + /*FALLTHROUGH*/ case BIO_READ: case BIO_WRITE: case BIO_DELETE: @@ -515,6 +519,16 @@ g_disk_start(struct bio *bp) error = EOPNOTSUPP; break; } + /*FALLTHROUGH*/ + case BIO_ZONE: + if (bp->bio_cmd == BIO_ZONE) { + if (!(dp->d_flags & DISKFLAG_CANZONE)) { + error = EOPNOTSUPP; + break; + } + g_trace(G_T_BIO, "g_disk_zone(%s)", + bp->bio_to->name); + } bp2 = g_clone_bio(bp); if (bp2 == NULL) { g_io_deliver(bp, ENOMEM); |