linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patchset 0/4] osd: Stop usage of blk_rq_append_bio
@ 2009-05-07 16:10 Boaz Harrosh
  2009-05-07 16:12 ` [PATCH 1/4] allow blk_rq_map_kern to append to requests Boaz Harrosh
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Boaz Harrosh @ 2009-05-07 16:10 UTC (permalink / raw)
  To: Jens Axboe, James Bottomley, FUJITA Tomonori, Jeff Garzik, Tejun
  Cc: Nicholas A. Bellinger


Osd library needs to submit pre-allocated bios, form several sources.
osdblk exofs and pNFS-layout driver all have prepared bios for IO submission.
On top of that the osd library needs to append additional segments to the
IO memory, for get/set attributes and more.

All these are done today by use of a temporary hack - blk_rq_append_bio.
This is bad on few accounts.
1. blk_rq_append_bio was not meant to be exported and is very specific to its users.
2. blk_rq_append_bio does not support chained bios.
3. blk_rq_append_bio does not bounce the bio and therefore current osd implementation
   has a bug.

The proposed solution adds two new fixtures to the block layer, and a corresponding
fixing patch to osd. These are:

[PATCH 1/4] allow blk_rq_map_kern to append to requests
[PATCH 2/4] libosd: Use new blk_rq_map_kern

  This is originally a James patch and it's used, to let blk_rq_map_kern append it's buffer
  to existing bio, and there for is able to be called multiple times in a loop, to append
  multiple segments. This API can also be useful for scsi/block targets that have segment
  information in some other memory structure (like scatterlist) and wants to set it into
  a request. Until such time that they have a proper support for mapping scatterlists directly.
  (Since above called on long lists might not be good for performance)

  Here in osd it makes tons of sense, and should be considered for inclusion.
  (The patches are based on linus-tip but should patch on block tree)

[RFC 3/4] New blk_make_request(), takes bio, returns a request
[RFC 4/4] libosd: Use of new blk_make_request
  
  Here I propose a new block API, that will support proper delegation of a bio
  to a full request. Please read inside the patch descriptions for details.
  After this patch both osd and block layer will have the proper support for osdblk
  driver as well as future needs.
  These patches also eliminate the last use of blk_rq_append_bio which can be now un-exported.

  These two patches conflic with Tejun's branch and are based on linus-tip. Upon positive review
  I will serialize them with Tejun and submit them properly. But first they must be agreed upon.
  Jens, I specially need your opinion on this?

Cheers
Boaz


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-05-17  8:24 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-07 16:10 [patchset 0/4] osd: Stop usage of blk_rq_append_bio Boaz Harrosh
2009-05-07 16:12 ` [PATCH 1/4] allow blk_rq_map_kern to append to requests Boaz Harrosh
2009-05-07 16:14 ` [PATCH 2/4] libosd: Use new blk_rq_map_kern Boaz Harrosh
2009-05-07 16:16 ` [RFC 3/4] New blk_make_request(), takes bio, returns a request Boaz Harrosh
2009-05-07 16:18 ` [RFC 4/4] libosd: Use of new blk_make_request Boaz Harrosh
2009-05-09  7:36 ` [patchset 0/4] osd: Stop usage of blk_rq_append_bio Jeff Garzik
2009-05-09  8:12 ` Tejun Heo
2009-05-12 11:25 ` Jens Axboe
2009-05-13 14:28   ` Boaz Harrosh
2009-05-13 14:36     ` Boaz Harrosh
2009-05-13 14:47       ` James Bottomley
2009-05-14 14:53         ` Boaz Harrosh
2009-05-14 15:35           ` James Bottomley
2009-05-14 16:11             ` Boaz Harrosh
2009-05-14 16:39               ` Boaz Harrosh
2009-05-17  8:24                 ` Boaz Harrosh
2009-05-14 16:46               ` James Bottomley
2009-05-13 14:52     ` Stephen Rothwell
2009-05-13 15:01       ` Boaz Harrosh
2009-05-13 15:13       ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).