lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 04 Nov 2010 16:14:51 +0300
From:	Vladislav Bolkhovitin <vst@...b.net>
To:	Boaz Harrosh <bharrosh@...asas.com>
CC:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Mike Christie <michaelc@...wisc.edu>,
	Christoph Hellwig <hch@....de>, Hannes Reinecke <hare@...e.de>,
	James Bottomley <James.Bottomley@...e.de>,
	Jens Axboe <axboe@...nel.dk>
Subject: Re: [RFC v2 16/21] tcm: Add PSCSI subsystem plugin

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ