From: Aboo Valappil <aboo@aboo.org>
To: dougg@torque.net
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>, linux-scsi@vger.kernel.org
Subject: Re: Linux Virtual SCSI HBAs and Virtual disks
Date: Fri, 26 Jan 2007 08:41:49 +1100 [thread overview]
Message-ID: <45B9241D.5040807@aboo.org> (raw)
In-Reply-To: <45B6D18A.8000607@torque.net>
Hi Doug Gilbert,
I am not sure if my previous email was received or not.
> # ./start_target.sh id=3 -files ../../zz_lun0 -v
> # lsscsi
> [0:0:0:0] disk Linux scsi_debug 0004 /dev/sda
> [1:0:0:0] disk VirtualH VHD 0 /dev/sdb
>
> So "id=3" doesn't look the target identifier. If not, what
> is it?
>
>
Actually it is not the target number, it can have only one target. This
is just an identification for the scsi_host created inside the kernel.
If you re-run the same command again with same id, the new process would
attach to the same scsi_host. This can be seen as two user process
serving the same virtual host bus adapter. If use a different id with
the same lun file, It will create a new scsi_host and it would appear as
the same LUN on a different host bus adapter.
> Perhaps you could examine the way scsi_debug (or most
> other LLDs) does autosense. This modern technique (used
> for about the last 12 years) relieves the scsi midlevel
> of having to send a follow up REQUEST SENSE.
>
What would i do if the SCSI target does not return any sense code? I
make some thing up or just return no-sense? In the new version, I made
up SK="Illegal request", ASC="Invalid Opcode" if I do not receive any
sense from target. But I think I should return no sense, ie SK=0,
ASC=0, ASCQ=0. Any thoughts?
> It would be easier to read those SCSI commands in the
> debug output if they were trimmed to their actual lengths
> (e.g. the INQUIRY is 12 00 00 00 24 00).
>
I will fix this.
Aboo
next prev parent reply other threads:[~2007-01-25 21:42 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-16 10:22 Linux Virtual SCSI HBAs and Virtual disks Aboo Valappil
2007-01-16 21:52 ` Erik Mouw
2007-01-16 23:01 ` aboo
2007-01-17 1:50 ` Douglas Gilbert
2007-01-17 8:36 ` Stefan Richter
2007-01-17 10:24 ` Aboo Valappil
2007-01-17 22:20 ` Douglas Gilbert
2007-01-17 21:59 ` aboo
2007-01-18 0:38 ` Stefan Richter
2007-01-21 9:48 ` Aboo Valappil
2007-01-21 9:53 ` Aboo Valappil
2007-01-21 11:24 ` Stefan Richter
2007-01-22 0:43 ` aboo
2007-01-22 2:23 ` aboo
2007-01-22 16:47 ` Stefan Richter
2007-01-22 16:58 ` Stefan Richter
2007-01-22 18:07 ` James Bottomley
2007-01-23 13:11 ` Aboo Valappil
2007-01-23 16:36 ` Randy Dunlap
2007-01-23 17:22 ` Stefan Richter
2007-01-24 9:47 ` Aboo Valappil
2007-01-25 22:02 ` Aboo Valappil
2007-01-23 17:16 ` Stefan Richter
2007-01-23 22:12 ` Aboo Valappil
2007-01-24 0:09 ` Stefan Richter
2007-01-24 3:24 ` Douglas Gilbert
2007-01-24 9:40 ` Aboo Valappil
2007-01-25 21:41 ` Aboo Valappil [this message]
2007-01-25 22:01 ` Stefan Richter
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=45B9241D.5040807@aboo.org \
--to=aboo@aboo.org \
--cc=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
--cc=stefanr@s5r6.in-berlin.de \
/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