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

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

 



Hi Max,

On Mon, 2017-03-06 at 00:56 +0100, Max Lohrmann wrote:
> 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.

Thanks alot for reporting this bug.  AFAIK, this has not been reported
to the list before..

> 
> 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;
> 

Looks fine. Applied to target-pending here:

https://git.kernel.org/cgit/linux/kernel/git/nab/target-pending.git/commit/?id=13603685c1f12c67a7a2427f00b63f39a2b6f7c9

Thanks for your contribution !

--
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