GC: BIO_ORDERED going away.

This commit is contained in:
Poul-Henning Kamp 2002-02-22 09:18:46 +00:00
parent 817988be19
commit af91f4fa16
5 changed files with 4 additions and 30 deletions

View File

@ -1448,9 +1448,7 @@ cdstart(struct cam_periph *periph, union ccb *start_ccb)
scsi_read_write(&start_ccb->csio, scsi_read_write(&start_ccb->csio,
/*retries*/4, /*retries*/4,
/* cbfcnp */ cddone, /* cbfcnp */ cddone,
(bp->bio_flags & BIO_ORDERED) != 0 ? MSG_SIMPLE_Q_TAG,
MSG_ORDERED_Q_TAG :
MSG_SIMPLE_Q_TAG,
/* read */bp->bio_cmd == BIO_READ, /* read */bp->bio_cmd == BIO_READ,
/* byte2 */ 0, /* byte2 */ 0,
/* minimum_cmd_size */ 10, /* minimum_cmd_size */ 10,

View File

@ -1242,8 +1242,7 @@ dastart(struct cam_periph *periph, union ccb *start_ccb)
devstat_start_transaction(&softc->device_stats); devstat_start_transaction(&softc->device_stats);
if ((bp->bio_flags & BIO_ORDERED) != 0 if ((softc->flags & DA_FLAG_NEED_OTAG) != 0) {
|| (softc->flags & DA_FLAG_NEED_OTAG) != 0) {
softc->flags &= ~DA_FLAG_NEED_OTAG; softc->flags &= ~DA_FLAG_NEED_OTAG;
softc->ordered_tag_count++; softc->ordered_tag_count++;
tag_code = MSG_ORDERED_Q_TAG; tag_code = MSG_ORDERED_Q_TAG;

View File

@ -102,9 +102,6 @@ SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLAG_RD, &ata_wc, 0,
SYSCTL_INT(_hw_ata, OID_AUTO, tags, CTLFLAG_RD, &ata_tags, 0, SYSCTL_INT(_hw_ata, OID_AUTO, tags, CTLFLAG_RD, &ata_tags, 0,
"ATA disk tagged queuing support"); "ATA disk tagged queuing support");
/* experimental cache flush on BIO_ORDERED */
#undef ATA_FLUSHCACHE_ON
void void
ad_attach(struct ata_device *atadev) ad_attach(struct ata_device *atadev)
{ {
@ -368,16 +365,6 @@ ad_start(struct ata_device *atadev)
if (!bp) if (!bp)
return; return;
#ifdef ATA_FLUSHCACHE_ON
/*
* if BIO_ORDERED is set cache should be flushed, if there are
* any outstanding requests, hold off and wait for them to finish
*/
if (adp->flags & AD_F_TAG_ENABLED &&
bp->bio_flags & BIO_ORDERED && adp->outstanding > 0)
return;
#endif
/* if tagged queueing enabled get next free tag */ /* if tagged queueing enabled get next free tag */
if (adp->flags & AD_F_TAG_ENABLED) { if (adp->flags & AD_F_TAG_ENABLED) {
while (tag <= adp->num_tags && adp->tags[tag]) while (tag <= adp->num_tags && adp->tags[tag])
@ -690,16 +677,6 @@ ad_interrupt(struct ad_request *request)
request->bp->bio_resid = request->bytecount; request->bp->bio_resid = request->bytecount;
#ifdef ATA_FLUSHCACHE_ON
if (request->bp->bio_flags & BIO_ORDERED) {
request->flags |= ADR_F_FLUSHCACHE;
if (ata_command(adp->device, ATA_C_FLUSHCACHE, 0, 0, 0, ATA_IMMEDIATE))
ata_prtdev(adp->device, "flushing cache failed\n");
else
return ATA_OP_CONTINUES;
}
finish:
#endif
biofinish(request->bp, &adp->stats, 0); biofinish(request->bp, &adp->stats, 0);
ad_free(request); ad_free(request);
adp->outstanding--; adp->outstanding--;

View File

@ -807,7 +807,7 @@ build_rq_buffer(struct rqelement *rqe, struct plex *plex)
/* Initialize the buf struct */ /* Initialize the buf struct */
/* copy these flags from user bp */ /* copy these flags from user bp */
bp->b_flags = ubp->b_flags & (B_NOCACHE | B_ASYNC); bp->b_flags = ubp->b_flags & (B_NOCACHE | B_ASYNC);
bp->b_io.bio_flags = ubp->b_io.bio_flags & BIO_ORDERED; bp->b_io.bio_flags = 0;
bp->b_iocmd = ubp->b_iocmd; bp->b_iocmd = ubp->b_iocmd;
#ifdef VINUMDEBUG #ifdef VINUMDEBUG
if (rqe->flags & XFR_BUFLOCKED) /* paranoia */ if (rqe->flags & XFR_BUFLOCKED) /* paranoia */

View File

@ -175,7 +175,7 @@ revive_block(int sdno)
{ {
bp->b_dev = VINUM_SD(sdno); /* create the device number */ bp->b_dev = VINUM_SD(sdno); /* create the device number */
bp->b_flags &= ~B_DONE; /* no longer done */ bp->b_flags &= ~B_DONE; /* no longer done */
bp->b_ioflags = BIO_ORDERED; /* and make this an ordered write */ bp->b_ioflags = 0;
bp->b_iocmd = BIO_WRITE; bp->b_iocmd = BIO_WRITE;
bp->b_resid = bp->b_bcount; bp->b_resid = bp->b_bcount;
bp->b_blkno = sd->revived; /* write it to here */ bp->b_blkno = sd->revived; /* write it to here */