Skip to contentSkip to conversation

bidi support: bidirectional request

RFC In review Boaz Harrosh 3 participants 3 messages Jan 21, 2007 – Jan 23, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC 3/6 bidi support: bidirectional request

- Instantiate another request_io_part in request for bidi_read.
- Define & Implement new API for accessing bidi parts.
- API to Build bidi requests and map to sglists.
- Define new end_that_request_block() function to end a complete request.

---
 block/elevator.c       |    7 +---
 block/ll_rw_blk.c      |  113 ++++++++++++++++++++++++++++++++++++++++++------
 include/linux/blkdev.h |   49 ++++++++++++++++++++-
 3 files changed, 149 insertions(+), 20 deletions(-)
block/elevator.c +1 -6
index 0e9ea69..53b552e 100644
@@ -741,14 +741,9 @@ struct request *elv_next_request(request
 			rq = NULL;
 			break;
 		} else if (ret == BLKPREP_KILL) {
-			int nr_bytes = rq_uni(rq)->hard_nr_sectors << 9;
-
-			if (!nr_bytes)
-				nr_bytes = rq_uni(rq)->data_len;
-
 			blkdev_dequeue_request(rq);
 			rq->cmd_flags |= REQ_QUIET;
-			end_that_request_chunk(rq, 0, nr_bytes);
+			end_that_request_block(rq, 0);
 			end_that_request_last(rq, 0);
 		} else {
 			printk(KERN_ERR "%s: bad return=%d\n", __FUNCTION__,
block/ll_rw_blk.c +100 -13

197 lines not on this page · raw message

include/linux/blkdev.h +48 -1

79 lines not on this page · raw message

#1 lore raw
Quoted 4 lines · Boaz Harrosh

- Instantiate another request_io_part in request for bidi_read.
- Define & Implement new API for accessing bidi parts.
- API to Build bidi requests and map to sglists.
- Define new end_that_request_block() function to end a complete request.

Actually, this approach looks to be a bit too narrow. You seem to be predicating on the idea that the bidirectional will transfer in and out of the same area. For some of the frame in/frame out stuff, we probably need the read and write areas for the bidirectional request to be separated.

James

#2 lore raw
Quoted 11 lines · James Bottomley
Quoted 4 lines · Boaz Harrosh

- Instantiate another request_io_part in request for bidi_read.
- Define & Implement new API for accessing bidi parts.
- API to Build bidi requests and map to sglists.
- Define new end_that_request_block() function to end a complete request.

Actually, this approach looks to be a bit too narrow. You seem to be predicating on the idea that the bidirectional will transfer in and out of the same area. For some of the frame in/frame out stuff, we probably need the read and write areas for the bidirectional request to be separated.

Hmm, our proposal introduces two separate and independent i/o areas. One used for uni-directional transfers and for bidi data output, the other is used for bidi data input so we're in agreement.

Benny