Actually, yes that was indeed one of the things I wanted to achieve with
the block layer rewrite -- the ability to send down other commands than
read/write down the queue. So not exactly bio, but more of a new block
feature.
See, now fs requests have REQ_CMD set in the request flag bits. This
means that it's a "regular" request, which has a string of bios attached
to it. Doing something ala
struct request *rq = get_request();
init_request(rq);
rq->rq_dev = target_dev;
rq->cmd[0] = GPCMD_FLUSH_CACHE;
rq->flags = REQ_PC;
/* additional info... */
queue_request(rq);
would indeed be possible. The attentive reader will now know where
ide-scsi is headed and why :-)
This would work for any SCSI and psueo-SCSI device, basically all the
stuff out there. For IDE, the request pre-handler would transform this
into an IDE command (or taskfile).
-- Jens Axboe- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/