From: Mike Christie <michaelc@cs.wisc.edu>
To: linux-scsi@vger.kernel.org
Subject: Re: [PATCH RFC/RFT 1/4] add some block layer helpers
Date: Thu, 15 Sep 2005 01:19:44 -0500 [thread overview]
Message-ID: <43291280.5060506@cs.wisc.edu> (raw)
In-Reply-To: <1126736384.16778.24.camel@max>
Mike Christie wrote:
> add blk_rq_map_kern_iov() which takes a iovec of buffers then
> maps them into bios and a request. It can make them into multiple
> bios to support sg and st's large requests and avoid the BIO_MAX_PAGES
> limit.
>
> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
>
> diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
> --- a/drivers/block/ll_rw_blk.c
> +++ b/drivers/block/ll_rw_blk.c
> @@ -28,6 +28,7 @@
> #include <linux/slab.h>
> #include <linux/swap.h>
> #include <linux/writeback.h>
> +#include <linux/uio.h>
> #include <linux/blkdev.h>
>
> /*
> @@ -2278,6 +2279,70 @@ int blk_rq_map_kern(request_queue_t *q,
> EXPORT_SYMBOL(blk_rq_map_kern);
>
> /**
> + * blk_rq_map_kern_iov - map kernel data to a request, for REQ_BLOCK_PC usage
> + * @q: request queue where request should be inserted
> + * @rq: request to fill
> + * @vec: pointer to kvec
> + * @vec_count: number of elements in kvec
> + * @gfp_mask: memory allocation flags
> + *
> + * blk_rq_map_kern_iov maps a kvec into a multiple bio request so that
> + * it can create very large requests.
> + *
> + * For now we assume that each element will fit in one bio
> + */
> +int blk_rq_map_kern_iov(request_queue_t *q, struct request *rq,
> + struct kvec *vec, int vec_count, unsigned int gfp)
> +{
On second thought, I think this function should work on pages and not
kernel addresses. It also has a leak in the error path.
next prev parent reply other threads:[~2005-09-15 6:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-14 22:19 [PATCH RFC/RFT 1/4] add some block layer helpers Mike Christie
2005-09-15 6:19 ` Mike Christie [this message]
2005-09-15 10:09 ` Christoph Hellwig
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=43291280.5060506@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--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.