target_core_sbc: use noop for SYNCHRONIZE_CACHE

Windows does not expect SYNCHRONIZE_CACHE to be not supported,
and will generate a BSOD upon shutdown when using rd_mcp backend.
So better use a noop here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
Hannes Reinecke 2013-03-04 14:08:06 +01:00 committed by Nicholas Bellinger
parent a937536b86
commit 882e3f8e69
1 changed files with 5 additions and 2 deletions

View File

@ -464,8 +464,11 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
break;
case SYNCHRONIZE_CACHE:
case SYNCHRONIZE_CACHE_16:
if (!ops->execute_sync_cache)
return TCM_UNSUPPORTED_SCSI_OPCODE;
if (!ops->execute_sync_cache) {
size = 0;
cmd->execute_cmd = sbc_emulate_noop;
break;
}
/*
* Extract LBA and range to be flushed for emulated SYNCHRONIZE_CACHE