From: Christoph Hellwig <hch@infradead.org>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH RFC/RFT 1/4] add some block layer helpers
Date: Thu, 15 Sep 2005 11:09:26 +0100 [thread overview]
Message-ID: <20050915100926.GA24689@infradead.org> (raw)
In-Reply-To: <43291280.5060506@cs.wisc.edu>
> > /**
> >+ * 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.
Passing down <page,offset,len> tuples, aka struct bio_vec sounds like
the better API indeed as all callers seem to either do virt_to_page or
allocate new pages anyway. This should also fix the highmem problems
inherited from the old code.
prev parent reply other threads:[~2005-09-15 10:09 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
2005-09-15 10:09 ` Christoph Hellwig [this message]
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=20050915100926.GA24689@infradead.org \
--to=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox