Index: sys/cam/ata/ata_da.c =================================================================== --- sys/cam/ata/ata_da.c +++ sys/cam/ata/ata_da.c @@ -2346,7 +2346,7 @@ PAGE_SIZE == bp->bio_ma_n, ("Short bio %p", bp)); cam_fill_ataio(ataio, - ada_retry_count, + (bp->bio_flags & BIO_NORETRY) != 0 ? 0 : ada_retry_count, adadone, rw_op, 0, Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c @@ -1071,6 +1071,8 @@ zio->io_target_timestamp = zio_handle_io_delay(zio); bp->bio_offset = zio->io_offset; bp->bio_length = zio->io_size; + if ((zio->io_flags & (ZIO_FLAG_IO_RETRY|ZIO_FLAG_TRYHARD)) == 0) + bp->bio_flags |= BIO_NORETRY; if (zio->io_type == ZIO_TYPE_READ) { bp->bio_cmd = BIO_READ; bp->bio_data = Index: sys/geom/geom_io.c =================================================================== --- sys/geom/geom_io.c +++ sys/geom/geom_io.c @@ -209,7 +209,7 @@ * Other bio flags are not suitable for cloning. */ bp2->bio_flags = bp->bio_flags & - (BIO_ORDERED | BIO_UNMAPPED | BIO_VLIST); + (BIO_ORDERED | BIO_UNMAPPED | BIO_VLIST | BIO_NORETRY); bp2->bio_length = bp->bio_length; bp2->bio_offset = bp->bio_offset; bp2->bio_data = bp->bio_data; Index: sys/sys/bio.h =================================================================== --- sys/sys/bio.h +++ sys/sys/bio.h @@ -66,6 +66,11 @@ #define BIO_UNMAPPED 0x10 #define BIO_TRANSIENT_MAPPING 0x20 #define BIO_VLIST 0x40 +/* + * This is a fail-fast bio, the issuer does not want the storage stack to + * ever retry it, the issuer will handle the retrying if needed. + */ +#define BIO_NORETRY 0x80 #ifdef _KERNEL struct disk;