Re: [patch 8/9] lguest: the block driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 9 May 2007, Jens Axboe wrote:
> Lets do it after it is merged, as not to create a hold-up point for
> lguest. Once it's in, I'll fix it up.

Ok. Seems pointless, though, as it's only a matter of:

			Pekka

From: Jens Axboe <[email protected]>

Add a new end_entire_request() function that ends the whole request,
not just the first segment.

Signed-off-by: Pekka Enberg <[email protected]>
---
 block/ll_rw_blk.c      |   11 +++++++++++
 include/linux/blkdev.h |    1 +
 2 files changed, 12 insertions(+)

Index: 2.6/block/ll_rw_blk.c
===================================================================
--- 2.6.orig/block/ll_rw_blk.c	2007-05-08 10:48:36.000000000 +0300
+++ 2.6/block/ll_rw_blk.c	2007-05-09 13:42:36.000000000 +0300
@@ -3606,6 +3606,17 @@ void end_request(struct request *req, in
 
 EXPORT_SYMBOL(end_request);
 
+void end_entire_request(struct request *req, int uptodate)
+{
+	if (end_that_request_first(req, uptodate, req->hard_nr_sectors))
+		BUG();
+	add_disk_randomness(req->rq_disk);
+	blkdev_dequeue_request(req);
+	end_that_request_last(req, uptodate);
+}
+
+EXPORT_SYMBOL(end_entire_request);
+
 void blk_rq_bio_prep(request_queue_t *q, struct request *rq, struct bio *bio)
 {
 	/* first two bits are identical in rq->cmd_flags and bio->bi_rw */
Index: 2.6/include/linux/blkdev.h
===================================================================
--- 2.6.orig/include/linux/blkdev.h	2007-05-04 09:19:25.000000000 +0300
+++ 2.6/include/linux/blkdev.h	2007-05-09 13:43:10.000000000 +0300
@@ -712,6 +712,7 @@ extern int end_that_request_first(struct
 extern int end_that_request_chunk(struct request *, int, int);
 extern void end_that_request_last(struct request *, int);
 extern void end_request(struct request *req, int uptodate);
+extern void end_entire_request(struct request *req, int uptodate);
 extern void blk_complete_request(struct request *);
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux