Add support for VERIFY(16) / Fix chkdsk on Windows

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

 



Hi everyone,

I have been running into the problem described here in 2012:

http://tib.tw/blog/tiberius/2012/07/28/911

Basically LIO does not implement the VERIFY_16 command (0x8F) and Windows chkdsk utility (tested on 2008 R2) does not handle the returned CHECK_CONDITION properly, resulting in an infinite loop.

The kernel will log huge amounts of this error:

kernel: TARGET_CORE[iSCSI]: Unsupported SCSI Opcode 0x8f, sending CHECK_CONDITION.

I used CentOS 7 with kernel 3.10.0-514.10.2.el7.x86_64 but the command does not seem to be implemented in master, either:

https://github.com/torvalds/linux/blob/master/drivers/target/target_core_sbc.c#L1107

Changing the code to the following fixes chkdsk (I have no idea whether that is according to the SCSI spec, though):

  case VERIFY:
+ case VERIFY_16:
  	size = 0;
+ 	if(cdb[0] == VERIFY) {
  		sectors = transport_get_sectors_10(cdb);
  		cmd->t_task_lba = transport_lba_32(cdb);
+ 	} else {
+ 		sectors = transport_get_sectors_16(cdb);
+ 		cmd->t_task_lba = transport_lba_64(cdb);
+ 	}
  	cmd->execute_cmd = sbc_emulate_noop;
  	goto check_lba;

Best regards

Max Lohrmann

PS: I'm not subscribed to this mailing list.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[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