Re: [RFD] blk_rq_map_pages new API

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

 



On Thu, 12 Feb 2009 18:50:33 +0900
FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> wrote:

> On Thu, 12 Feb 2009 11:19:09 +0200
> Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:
> 
> > Boaz Harrosh wrote:
> > > /**
> > >  * blk_rq_map_pages - Receives an array of pages and appends them to a request structure 
> > >  *
> > >  * @rq:  The request to map
> > >  * @pages_info: A structure that specifies the array of pages, offset and more that need to be
> > >  *              map to the request. the @pages_info->null_mapped is assumed to be 1 and is ignored.
> > >  * @length: Total bytes to map. Array of pages can be larger, stop mapping after @length bytes mapped.
> > >  * @max_pages: When allocating the internal bio use @max_pages as an hint that says the amount of anticipated
> > >  *             pages that will be mapped. This member is optional and can be zero.
> > >  * 
> > >  * blk_rq_map_pages can be called multiple times so the user does not need to allocate a contiguous array
> > >  * of struct page pointers but can call this routine multiple times. In that case max_pages can be set
> > >  * so no bio re-allocation occurs.
> > >  * There is no unmap function for this mapping, the request is completed in the regular way.
> > >  */
> > > 
> > > int blk_rq_map_pages(struct request rq, struct *rq_map_data pages_info, unsigned length, unsigned max_pages);
> > > 
> > > 
> > > Implementation comments:
> > > - Then when this member is available many places that call blk_rq_map_user() rq_map_data and null_mapped set,
> > >   and buff == NULL, can be converted to this member.
> > > 
> > > - Internal block implementation is refactored to not duplicate any code with blk_rq_map_user().
> > > 
> > > Thanks for any comments
> > > Boaz
> > > 
> > > --
> > 
> > FUJITA Tomonori wrote:
> > > Please send a patch to implement the proposal.
> > > 
> > 
> > Is the above API accepted by you? Is it accepted by Jens?
> > Should I also attempt first comment above.
> >
> > If its OK I will implement it ASAP.
> 
> Sorry, I'm not sure until I see the actual code. You always find
> tricky things when you actually write the code.
> 
> The patch should be small. It's not difficult at all to write a patch
> to see how it works.

BTW, the idea is fine by me:

I have some page frames and want to build a request out of them.

That's what st and osst want. If OSD ULD wants it, adding a new API
for it sounds a good idea to me. Then we can remove some features of
blk_rq_map_user that I added for st and osst.
--
To unsubscribe from this list: 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux