From: Mike Christie <michaelc@cs.wisc.edu>
To: Aravind Parchuri <aravind.parchuri@gmail.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: WRITE BUFFER commands through SG_IO getting rounded up to sector past 32k
Date: Mon, 12 Mar 2007 13:06:54 -0500 [thread overview]
Message-ID: <45F596BE.8030103@cs.wisc.edu> (raw)
In-Reply-To: <45F3573E.2040802@aim.com>
Aravind Parchuri wrote:
> michaelc@cs.wisc.edu wrote:
>> Aravind Parchuri wrote:
>>
>>> My log messages were getting all mixed up, so I cleaned up my little
>>> test to send just one command at a time. It actually looks like the mid
>>> layer passes the command through to open-iscsi with the right size the
>>> first time, but then it sends a second command with request_bufflen = 0.
>>>
>>> I can verify that the command completed on the target just like the
>>> regular ones did, so there should be no reason for a retry of any sort.
>>>
>>> Here's the log for a 32896 byte command:
>>> Mar 9 11:27:43 ITX000c292c3c8d kernel: sg_open: dev=0, flags=0x802
>>> Mar 8 11:27:43 ITX000c292c3c8d kernel: sg_add_sfp: sfp=0xcbadc000
>>> Mar 8 11:27:43 ITX000c292c3c8d kernel: sg_build_reserve: req_size=32768
>>> Mar 8 11:27:43 ITX000c292c3c8d kernel: sg_build_indirect:
>>> buff_size=32768, blk_size=32768
>>> Mar 8 11:27:43 ITX000c292c3c8d kernel: sg_add_sfp: bufflen=32768,
>>> k_use_sg=1
>>> Mar 8 11:27:43 ITX000c292c3c8d kernel: sg_ioctl: sg0, cmd=0x2285
>>> Mar 8 11:27:43 ITX000c292c3c8d kernel: sg_common_write: scsi
>>> opcode=0x3b, cmd_size=10
>>> Mar 8 11:27:43 ITX000c292c3c8d kernel: sg_start_req: dxfer_len=32896
>>> Mar 8 11:27:43 ITX000c292c3c8d kernel: sg_build_indirect:
>>> buff_size=32896, blk_size=33280
>>> Mar 8 11:27:43 ITX000c292c3c8d kernel: sg_write_xfer: num_xfer=32896,
>>> iovec_count=0, k_use_sg=2
>>> Mar 8 11:27:43 ITX000c292c3c8d kernel: iscsi_queuecommand: opcode 3b
>>> request_bufflen 32896 transfersize 32896
>>>
>> Did you add your own output? Could you enable iscsi debugging? What
>> kernel is this with and what versions of open-iscsi (upstream or svn or
>> tarball release)?
>>
> No custom output, all of this is from scsi (SCSI_LOG_TIMEOUT=5) and
> open-iscsi (DEBUG_SCSI enabled). I thought I mentioned this in an
> earlier mail - the kernel is 2.6.19, but the open-iscsi drivers and
The output here does not have DEBUG_SCSI enabled. It just has your
custom iscsi output. The first log had DEBUG_SCSI iscsi output.
But what I want is not just parts you cut out. I am looking for all of
it. If I run:
sg_write_buffer /dev/sdi -l 32896
with my patch and a netapp target, I get the error:
Write buffer command not supported
If I look at the iscsi log, I see
Mar 12 12:59:54 madmax kernel: iscsi: cmd [itt 0x25 total 32896 imm_data
32896 unsol count 0, unsol offset 32896]
Mar 12 12:59:54 madmax kernel: iscsi: ctask enq [write cid 0 sc
ffff81000e82d6c0 cdb 0x3b itt 0x25 len 32896 cmdsn 294 win 128]
Mar 12 12:59:54 madmax kernel: iscsi: ctask deq [cid 0 xmstate 2 itt 0x25]
Mar 12 12:59:55 madmax kernel: iscsi: cmdrsp [op 0x21 cid 0 itt 0x25 len 24]
Mar 12 12:59:55 madmax kernel: iscsi: copied 22 bytes of sense
Mar 12 12:59:55 madmax kernel: iscsi: done [sc ffff81000e82d6c0 res 2
itt 0x25]
which shows the len got set and that the target failed the target and we
got some sense back. The command is then failed to sg and sg returns to
userspace.
Your output just shows that we may be retrying the same command over and
over and it never completes which would be strange because the command
is a block pc command. It would help to see what happens with iscsi's
DEBUG_SCSI option to see if the command failed or completed ok. It would
also be nice to get the scsi-ml output to see what the sense is and what
is going on there, but as a first step we can look at the iscsi output.
Also what target are you using?
next prev parent reply other threads:[~2007-03-12 18:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 0:01 WRITE BUFFER commands through SG_IO getting rounded up to sector past 32k Aravind Parchuri
2007-03-07 0:39 ` Mike Christie
2007-03-08 21:59 ` Aravind Parchuri
2007-03-08 22:53 ` Mike Christie
2007-03-09 23:37 ` Aravind Parchuri
2007-03-10 4:56 ` Aravind Parchuri
2007-03-10 20:59 ` Mike Christie
2007-03-11 1:11 ` Aravind Parchuri
2007-03-12 18:06 ` Mike Christie [this message]
2007-03-12 23:58 ` Aravind Parchuri
2007-03-13 17:52 ` Mike Christie
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=45F596BE.8030103@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=aravind.parchuri@gmail.com \
--cc=linux-scsi@vger.kernel.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