From: Vladislav Bolkhovitin <vst@vlnb.net>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Mike Christie <michaelc@cs.wisc.edu>,
Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>,
James Bottomley <James.Bottomley@suse.de>,
Jens Axboe <axboe@kernel.dk>
Subject: Re: [RFC v2 16/21] tcm: Add PSCSI subsystem plugin
Date: Thu, 04 Nov 2010 16:14:51 +0300 [thread overview]
Message-ID: <4CD2B1CB.6070004@vlnb.net> (raw)
In-Reply-To: <4CD01EE2.20705@panasas.com>
Boaz Harrosh, on 11/02/2010 05:23 PM wrote:
[...]
>> + * Some pseudo SCSI HBAs do not fill in sector_size
>> + * correctly. (See ide-scsi.c) So go ahead and setup sane
>> + * values.
>> + */
>> + if (!sd->sector_size) {
>> + switch (sd->type) {
>> + case TYPE_DISK:
>> + sd->sector_size = 512;
>> + break;
>> + case TYPE_ROM:
>> + sd->sector_size = 2048;
>> + break;
>> + case TYPE_TAPE: /* The Tape may not be in the drive */
>> + break;
>> + case TYPE_MEDIUM_CHANGER: /* Control CDBs only */
>> + break;
>> + default:
>> + printk(KERN_ERR "Unable to set sector_size for %d\n",
>> + sd->type);
>> + return NULL;
>
> What about sector-less devices? OSD, Scanners, printers ...
[...]
>> + /*
>> + * For TYPE_TAPE, attempt to determine blocksize with MODE_SENSE.
>> + */
>> + if (sd->type == TYPE_TAPE) {
>
> Just as a future note:
> One of the things I'm missing from LIO is the notion of SCSI_TYPE or SCSI
> class. So things like this can be done in a plugin manner as per TYPE
> Like in the Kernel we have the ULDs for that.
This is exactly how it is done in SCST.
Also SCST well handles sector-less devices.
Vlad
next prev parent reply other threads:[~2010-11-04 13:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-22 22:51 [RFC v2 16/21] tcm: Add PSCSI subsystem plugin Nicholas A. Bellinger
2010-11-02 14:23 ` Boaz Harrosh
2010-11-04 13:14 ` Vladislav Bolkhovitin [this message]
2010-11-09 5:13 ` Nicholas A. Bellinger
2010-11-09 9:16 ` Boaz Harrosh
2010-11-09 9:56 ` Nicholas A. Bellinger
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=4CD2B1CB.6070004@vlnb.net \
--to=vst@vlnb.net \
--cc=James.Bottomley@suse.de \
--cc=axboe@kernel.dk \
--cc=bharrosh@panasas.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=nab@linux-iscsi.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