From: Boaz Harrosh <bharrosh@panasas.com>
To: Douglas Gilbert <dougg@torque.net>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
open-osd mailing-list <osd-dev@open-osd.org>
Subject: [Q] In sg_io_v4 what to use as flag for "queue at_head"
Date: Mon, 19 Jan 2009 13:18:47 +0200 [thread overview]
Message-ID: <49746197.200@panasas.com> (raw)
Douglas Gilbert <dougg@torque.net> wrote ...
> struct sg_io_v4 {
> __s32 guard; /* [i] 'Q' to differentiate from v3 */
> __u32 protocol; /* [i] 0 -> SCSI , .... */
> __u32 subprotocol; /* [i] 0 -> SCSI command, 1 -> SCSI task
> management function, .... */
>
> __u32 request_len; /* [i] in bytes */
> __u64 request; /* [i], [*i] {SCSI: cdb} */
> __u64 request_tag; /* [i] {SCSI: task tag (only if flagged)} */
> __u32 request_attr; /* [i] {SCSI: task attribute} */
> __u32 request_priority; /* [i] {SCSI: task priority} */
> __u32 request_extra; /* [i] {spare, for padding} */
> __u32 max_response_len; /* [i] in bytes */
> __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */
>
> /* "dout_": data out (to device); "din_": data in (from device) */
> __u32 dout_iovec_count; /* [i] 0 -> "flat" dout transfer else
> dout_xfer points to array of iovec */
> __u32 dout_xfer_len; /* [i] bytes to be transferred to device */
> __u32 din_iovec_count; /* [i] 0 -> "flat" din transfer */
> __u32 din_xfer_len; /* [i] bytes to be transferred from device */
> __u64 dout_xferp; /* [i], [*i] */
> __u64 din_xferp; /* [i], [*o] */
>
> __u32 timeout; /* [i] units: millisecond */
> __u32 flags; /* [i] bit mask */
> __u64 usr_ptr; /* [i->o] unused internally */
> __u32 spare_in; /* [i] */
> ...
Currently because of a twisted accident sg and bsg queue their async
request with the "at_head" flag set when calling blk_execute_rq_nowait.
Since sg_io_v4 is new and as plenty of possible choices, what would be
the best place to put the "at_head" flag?
Douglas ?
What was your intention with the above:
__u32 request_priority; /* [i] {SCSI: task priority} */
[And while at it, what was:
__u32 request_attr; /* [i] {SCSI: task attribute} */
]
Should I define (bsg.h):
enum {
BSG_AT_HEAD = 0, /* compatible with old code */
BSG_AT_TAIL,
}
And put it in request_priority
or define:
#define SG_FLAG_AT_TAIL 0x10 /* See sg.h for more/other flags (sg.h flags are ignored by bsg) */
And OR that into the old flags member that is otherwise
unused by current bsg code
Thanks
Boaz
next reply other threads:[~2009-01-19 11:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 11:18 Boaz Harrosh [this message]
2009-01-19 17:43 ` [Q] In sg_io_v4 what to use as flag for "queue at_head" Douglas Gilbert
2009-01-19 18:24 ` Douglas Gilbert
2009-01-20 7:05 ` Boaz Harrosh
2009-01-20 19:27 ` Douglas Gilbert
2009-01-21 5:31 ` FUJITA Tomonori
2009-01-21 5:31 ` FUJITA Tomonori
2009-01-21 8:12 ` Boaz Harrosh
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=49746197.200@panasas.com \
--to=bharrosh@panasas.com \
--cc=dougg@torque.net \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-scsi@vger.kernel.org \
--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