Messages in this thread | | | Date | Mon, 11 Mar 2002 20:40:13 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: [patch] My AMD IDE driver, v2.7 |
| |
On Mon, 11 Mar 2002, Jeff Garzik wrote: > > For the details of the userspace interface (for both ATA and SCSI), my > idea was to use standard read(2) and write(2).
I like it, but you have to realize that most, if not all, of the commands really are not a matter of a read or a write, but a "transaction", which is a pair of both (and at least in theory you could have transactions that are more complex than just a "command + result", ie more than just a write("cmd + outdata")+read("status + indata")).
I agree 100% with the notion of using read/write to do this, but I think you need to make it very explicit that we _are_ talking about transactions, and that the file descriptor would act as a "transaction descriptor" when you do this. The file descriptor is the one that matches up the write that started the transaction with the read that gets the status of it - thus allowing multiple concurrent transactions in flight.
And the command has to have some structure, ie it needs to not just be the low-level command, but also have the information about the "format" of the transaction (so that the generic layer can build up the correct BIO data structures for the result, before it actually sees the read itself).
Linus
- 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/
| |