From cd063bef414c51d79b9c6ea7a8ef8f9d319529bc Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Wed, 7 Nov 2012 20:01:10 -0800 Subject: target/sbc: Seperate WRITE_SAME based on UNMAP flag in sbc_ops This patch adds a new sbc_ops->execute_write_same_unmap() caller for use with WRITE_SAME w/ UNMAP=1, and performs the ->execute_cmd() setup based this bit within sbc_setup_write_same() code. Also, makes the changes in sbc_parse_cdb() to handle a sense_reason_t return from sbc_setup_write_same() on error. Reported-by: Christoph Hellwig Cc: Martin K. Petersen Signed-off-by: Nicholas Bellinger --- include/target/target_core_backend.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/target') diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index aa868090b9a..3393ab10766 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h @@ -41,6 +41,7 @@ struct sbc_ops { sense_reason_t (*execute_rw)(struct se_cmd *cmd); sense_reason_t (*execute_sync_cache)(struct se_cmd *cmd); sense_reason_t (*execute_write_same)(struct se_cmd *cmd); + sense_reason_t (*execute_write_same_unmap)(struct se_cmd *cmd); sense_reason_t (*execute_unmap)(struct se_cmd *cmd); }; -- cgit v1.2.3-70-g09d2