From: Benny Halevy <bhalevy@panasas.com>
To: dougg@torque.net, Boaz Harrosh <bharrosh@panasas.com>
Cc: Jens Axboe <jens.axboe@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
Mike Christie <michaelc@cs.wisc.edu>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
open-iscsi@googlegroups.com, Daniel.E.Messinger@seagate.com,
Liran Schour <LIRANS@il.ibm.com>,
James Bottomley <James.Bottomley@SteelEye.com>
Subject: Re: [RFC 1/6] bidi support: request dma_data_direction
Date: Tue, 23 Jan 2007 15:37:58 +0200 [thread overview]
Message-ID: <45B60FB6.1050708@panasas.com> (raw)
In-Reply-To: <45B4D2A0.4080201@torque.net>
Douglas Gilbert wrote:
> Benny Halevy wrote:
>> Douglas Gilbert wrote:
>
> Perhaps the right use of DMA_BIRECTIONAL needs to be
> defined.
>
> Could it be used with a XDWRITE(10) SCSI command
> defined in sbc3r07.pdf at http://www.t10.org ? I suspect
> using two scatter gather lists would be a better approach.
Exactly. This is a classic example of a bidirectional command
and indeed two scatter-gather lists (that are mapped into two
bio lists) are used.
>
>>>> - Introduce new blk_rq_init_unqueued_req() and use it in places ad-hoc
>>>> requests were used and bzero'ed.
>>> With a bi-directional transfer is it always unambiguous
>>> which transfer occurs first (or could they occur at
>>> the same time)?
>> The bidi transfers can occur in any order and in parallel.
>
> Then it is not sufficient for modern SCSI transports in which
> certain bidirectional commands (probably most) have a well
> defined order.
>
> So DMA_BIDIRECTIONAL looks PCI specific and it may have
> been a mistake to replace other subsystem's direction flags
> with it. RDMA might be an interesting case.
>
I would say that it might make sense to define an equivalent
for dma_data_direction at the block layer, for example:
enum req_io_direction {
REQ_IO_NONE = 0,
REQ_IN_FROM_DEVICE = 1,
REQ_OUT_TO_DEVICE = 2,
REQ_BIDIRECTIONAL = 3,
};
can be used in struct request and upper layers.
Besides the fact that having separate I/O buffers for bidirectional
transfers makes block I/O different from pci bidi I/O,
this enum makes more sense "arithmetically" and has
a much better meaning for the zero value.
Today DMA_BIDIRECTIONAL is used in several places as the default and "invalid"
value since no-one ever used it before. I'd rather have the value 0 mean
REQ_IO_NONE (or REQ_IO_INVALID if we want such thing).
Benny
next prev parent reply other threads:[~2007-01-23 13:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-21 23:21 [RFC 1/6] bidi support: request dma_data_direction Boaz Harrosh
2007-01-22 0:24 ` Douglas Gilbert
2007-01-22 6:06 ` Benny Halevy
2007-01-22 15:05 ` Douglas Gilbert
2007-01-22 15:31 ` James Bottomley
2007-01-23 13:37 ` Benny Halevy [this message]
2007-01-22 21:53 ` William Studenmund
2007-01-22 5:29 ` Muli Ben-Yehuda
2007-01-23 13:45 ` Benny Halevy
2007-01-23 14:37 ` Muli Ben-Yehuda
2007-01-23 15:17 ` Benny Halevy
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=45B60FB6.1050708@panasas.com \
--to=bhalevy@panasas.com \
--cc=Daniel.E.Messinger@seagate.com \
--cc=James.Bottomley@SteelEye.com \
--cc=LIRANS@il.ibm.com \
--cc=bharrosh@panasas.com \
--cc=dougg@torque.net \
--cc=hch@infradead.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=open-iscsi@googlegroups.com \
/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