[bug] Wrong asc for out-of-range LBA on pscsi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So far I reproduced this with 3.4.0.  I'll try a more recent kernel tomorrow.

It reproduces with both loopback and iSCSI backends.  Here is it with loopback.

The configuration is:

cd /sys/kernel/config/target
mkdir -p core/pscsi_0/sda
echo scsi_host_id=0,scsi_channel_id=0,scsi_target_id=0,scsi_lun_id=0 > core/pscsi_0/sda/control
echo /dev/sda > core/pscsi_0/sda/udev_path
echo 1 > core/pscsi_0/sda/enable

mkdir -p loopback/naa.600140554cf3a18e/tpgt_1
mkdir -p loopback/naa.600140554cf3a18e/tpgt_1/lun/lun_1
cd loopback/naa.600140554cf3a18e/tpgt_1
echo naa.60014053226f0388 > nexus
ln -sf ../../../core/pscsi_0/sda lun/lun_1/virtual_scsi_port
echo '- - -' > `echo /sys/bus/tcm_loop_bus/drivers/tcm_loop/tcm_loop_adapter_0/host*/scsi_host/host*/scan`

This works:

# sg_read blk_sgio=1 if=/dev/sdb skip=20807 count=2 cdbsz=10  > /dev/null 
Assume default 'bs' (block size) of 512 bytes
reading: SCSI status: Check Condition 
 Fixed format, current;  Sense key: Illegal Request
 Additional sense: Logical block address out of range
sg_read: SCSI READ failed
Some error occurred,  remaining block count=2
0+0 records in
# sg_read blk_sgio=1 if=/dev/sda skip=20807 count=2 cdbsz=10  > /dev/null 
Assume default 'bs' (block size) of 512 bytes
reading: SCSI status: Check Condition 
 Fixed format, current;  Sense key: Illegal Request
 Additional sense: Logical block address out of range
sg_read: SCSI READ failed
Some error occurred,  remaining block count=2
0+0 records in

This doesn't:

# sg_read blk_sgio=1 if=/dev/sda skip=0x80000000 count=2 cdbsz=10  > /dev/null 
Assume default 'bs' (block size) of 512 bytes
reading: SCSI status: Check Condition 
 Fixed format, current;  Sense key: Illegal Request
 Additional sense: Logical block address out of range
sg_read: SCSI READ failed
Some error occurred,  remaining block count=2
0+0 records in
# sg_read blk_sgio=1 if=/dev/sdb skip=0x80000000 count=2 cdbsz=10  > /dev/null 
Assume default 'bs' (block size) of 512 bytes
reading: SCSI status: Check Condition 
 Fixed format, current;  Sense key: Illegal Request
 vendor specific ASC=80, ASCQ= 0
sg_read: SCSI READ failed
Some error occurred,  remaining block count=2
0+0 records in

and leaves this in dmesg:
[  196.672498] LBA: 2147483648 Sectors: 2 exceeds transport_dev_end_lba(): 20809

HTH,

Paolo
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux