linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Jens Axboe <jens.axboe@oracle.com>,
	James Bottomley <James.Bottomley@SteelEye.com>,
	Andrew Morton <akpm@osdl.org>,
	Mike Christie <michaelc@cs.wisc.edu>,
	Christoph Hellwig <hch@infradead.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	Linux-ide <linux-ide@vger.kernel.org>,
	Benny Halevy <bhalevy@panasas.com>,
	osd-dev@open-osd.org, bharrosh@panasas.com
Subject: [PATCH 0/4] bidi support: block layer bidirectional io.
Date: Sun, 15 Apr 2007 20:17:12 +0300	[thread overview]
Message-ID: <46225E18.7070404@panasas.com> (raw)

Following are 4 (large) patches for support of bidirectional
block I/O in kernel. (not including SCSI-ml or iSCSI)

The submitted work is against linux-2.6-block tree as of
2007/04/15, and will only cleanly apply in succession.

The patches are based on the RFC I sent 3 months ago. They only
cover the block layer at this point. I suggest they get included
in Morton's tree until they reach the kernel so they can get
compiled on all architectures/platforms. There is still a chance
that architectures I did not compile were not fully converted.
(FWIW, my search for use of struct request members failed to find
them). If you find such a case, please send me the file
name and I will fix it ASAP.

Patches summary:
1. [PATCH 1/4] bidi support: request dma_data_direction
	- Convert REQ_RW bit flag to a dma_data_direction member like in SCSI-ml use.
	- removed rq_data_dir() and added other APIs for querying request's direction.
	- fix usage of rq_data_dir() and peeking at req->cmd_flags & REQ_RW to using
	  new api.
	- clean-up bad usage of DMA_BIDIRECTIONAL and bzero of none-queue requests,
	  to use the new blk_rq_init_unqueued_req()

2. [PATCH 2/4] bidi support: fix req->cmd == INT cases
	- Digging into all these old drivers, I have found traces of past life
	  where request->cmd was the command type. This patch fixes some of these
	  places. All drivers touched by this patch are clear indication of drivers
	  that were not used for a while. Should we removed them from Kernel? 
	  These Are:
		drivers/acorn/block/fd1772.c, drivers/acorn/block/mfmhd.c,
		drivers/block/nbd.c, drivers/cdrom/aztcd.c, drivers/cdrom/cm206.c
		drivers/cdrom/gscd.c, drivers/cdrom/mcdx.c, drivers/cdrom/optcd.c
		drivers/cdrom/sjcd.c, drivers/ide/legacy/hd.c, drivers/block/amiflop.c

2. [PATCH 3/4] bidi support: request_io_part
	- extract io related fields in struct request into struct request_io_part
	  in preparation to full bidi support.
	- new rq_uni() API to access the sub-structure. (Please read below comment
	  on why an API and not open code the access)
	- Convert All users to new API.

3. [PATCH 4/4] bidi support: bidirectional block layer
	- add one more request_io_part member for bidi support in struct request.
	- add block layer API functions for mapping and accessing bidi data buffers
	  and for ending a block request as a whole (end_that_request_block())

--------------------------------------------------------------------------------------------
Developer comments:

patch 1/4: Borrow from struct scsi_cmnd use of enum dma_data_direction. Further work (in
progress) is the removal of the corresponding member from struct scsi_cmnd and converting
all users to directly access rq_dma_dir(sc->req).

patch 3/4: The reasons for introducing the rq_uni(req) API rather than directly accessing
req->uni are:

* WARN(!bidi_dir(req)) is life saving when developing bidi enabled paths.  Once we, bidi
  users, start to push bidi requests down the kernel paths, we immediately get warned of
  paths we did not anticipate. Otherwise, they will be very hard to find, and will hurt
  kernel stability.

* A cleaner and saner future implementation could be in/out members rather than
  uni/bidi_read.  This way the dma_direction member can deprecated and the uni sub-
  structure can be maintained using a pointer in struct req.
  With this API we are free to change the implementation in the future without
  touching any users of the API. We can also experiment with what's best. Also, with the
  API it is much easier to convert uni-directional drivers for bidi (look in
  ll_rw_block.c in patch 4/4).

* Note, that internal uses inside the block layer access req->uni directly, as they will
  need to be changed if the implementation of req->{uni, bidi_read} changes.





             reply	other threads:[~2007-04-15 17:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-15 17:17 Boaz Harrosh [this message]
2007-04-15 17:25 ` [PATCH 1/4] bidi support: request dma_data_direction Boaz Harrosh
2007-04-15 17:31 ` [PATCH 2/4] bidi support: fix req->cmd == INT cases Boaz Harrosh
2007-04-15 17:32 ` [PATCH 3/4] bidi support: request_io_part Boaz Harrosh
2007-04-29 15:49   ` Boaz Harrosh
2007-04-15 17:33 ` [PATCH 4/4] bidi support: bidirectional request Boaz Harrosh
2007-04-28 19:48   ` FUJITA Tomonori
2007-04-29 15:48     ` Boaz Harrosh
2007-04-29 18:49       ` James Bottomley
2007-04-30 11:11         ` Jens Axboe
2007-04-30 11:53           ` Benny Halevy
2007-04-30 11:59             ` Jens Axboe
2007-04-30 14:52               ` Douglas Gilbert
2007-04-30 14:51                 ` Jens Axboe
2007-04-30 15:12                   ` Benny Halevy
2007-05-01 18:22                   ` Boaz Harrosh
2007-05-01 18:57                     ` Jens Axboe
2007-05-01 19:01                       ` FUJITA Tomonori
2007-04-30 13:05           ` Mark Lord
2007-04-30 13:07             ` Jens Axboe
2007-05-01 19:50           ` FUJITA Tomonori
2007-04-16 18:03 ` [PATCH 0/4] bidi support: block layer bidirectional io Douglas Gilbert

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=46225E18.7070404@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=bhalevy@panasas.com \
    --cc=hch@infradead.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=osd-dev@open-osd.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 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).