From: Mike Christie <michaelc@cs.wisc.edu>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Jens Axboe <axboe@suse.de>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [RFC] Add user scatter gather I/O to SG_IO
Date: Sun, 12 Jun 2005 15:19:46 -0700 [thread overview]
Message-ID: <1118614786.10120.2.camel@mina> (raw)
In-Reply-To: <1118447969.5031.44.camel@mulgrave>
On Fri, 2005-06-10 at 16:59, James Bottomley wrote:
> This should be the last in the series of patches implementing
> scsi_wait_req and scsi_do_req in the block layer. It adds
> scatter/gather I/O from the user as a new feature of SG_IO. It also
> exports the API for this which can now be used by the sg driver.
>
> The patch is lightly tested, but appears to work fine.
>
> James
>
>
> +void blk_execute_rq_nowait(request_queue_t *q, struct gendisk *bd_disk,
> + struct request *rq, int at_head,
> + void (*done)(struct request *))
> +{
> + int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;
> +
> + rq->rq_disk = bd_disk;
> +
> +
> + rq->flags |= REQ_NOMERGE;
> + rq->end_io = done;
> + elv_add_request(q, rq, where, 1);
> + generic_unplug_device(q);
> +}
> +
This is useful for device mapper hw_hanlders. Can we get it and
__blk_put_request exported? See below.
export blk_execute_rq_nowait and __blk_put_request so device mapper
hw_handlers can use them.
diff -aurp cogito/drivers/block/ll_rw_blk.c linux-block-cogito/drivers/block/ll_rw_blk.c
--- cogito/drivers/block/ll_rw_blk.c 2005-06-11 18:48:25.000000000 -0700
+++ linux-block-cogito/drivers/block/ll_rw_blk.c 2005-06-12 14:27:34.000000000 -0700
@@ -2301,6 +2301,8 @@ void blk_execute_rq_nowait(request_queue
generic_unplug_device(q);
}
+EXPORT_SYMBOL(blk_execute_rq_nowait);
+
/**
* blk_execute_rq - insert a request into queue for execution
* @q: queue to insert the request in
@@ -2482,7 +2484,7 @@ void disk_round_stats(struct gendisk *di
/*
* queue lock must be held
*/
-static void __blk_put_request(request_queue_t *q, struct request *req)
+void __blk_put_request(request_queue_t *q, struct request *req)
{
struct request_list *rl = req->rl;
@@ -2511,6 +2513,8 @@ static void __blk_put_request(request_qu
}
}
+EXPORT_SYMBOL(__blk_put_request);
+
void blk_put_request(struct request *req)
{
/*
diff -aurp cogito/include/linux/blkdev.h linux-block-cogito/include/linux/blkdev.h
--- cogito/include/linux/blkdev.h 2005-06-11 18:51:32.000000000 -0700
+++ linux-block-cogito/include/linux/blkdev.h 2005-06-12 14:38:56.000000000 -0700
@@ -540,11 +540,15 @@ extern void blk_unregister_queue(struct
extern void register_disk(struct gendisk *dev);
extern void generic_make_request(struct bio *bio);
extern void blk_put_request(struct request *);
+extern void __blk_put_request(request_queue_t *, struct request *);
extern void blk_end_sync_rq(struct request *rq);
extern void blk_attempt_remerge(request_queue_t *, struct request *);
extern void __blk_attempt_remerge(request_queue_t *, struct request *);
extern struct request *blk_get_request(request_queue_t *, int, int);
extern void blk_insert_request(request_queue_t *, struct request *, int, void *);
+extern void blk_execute_rq_nowait(request_queue_t *q, struct gendisk *bd_disk,
+ struct request *rq, int at_head,
+ void (*done)(struct request *));
extern void blk_requeue_request(request_queue_t *, struct request *);
extern void blk_plug_device(request_queue_t *);
extern int blk_remove_plug(request_queue_t *);
next prev parent reply other threads:[~2005-06-12 22:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-10 23:59 [RFC] Add user scatter gather I/O to SG_IO James Bottomley
2005-06-12 22:19 ` Mike Christie [this message]
2005-06-13 6:55 ` Jens Axboe
2005-06-13 13:48 ` James Bottomley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1118614786.10120.2.camel@mina \
--to=michaelc@cs.wisc.edu \
--cc=James.Bottomley@SteelEye.com \
--cc=axboe@suse.de \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.