> > /** > >+ * 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. - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html