From: Nicholas Bellinger Date: Thu, 23 Aug 2012 01:53:12 +0000 (-0700) Subject: target/rd: Allow WriteCacheEnabled=1 operation with rd_mcp backends X-Git-Tag: v3.12-rc1~2191^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a60fbbc446a75e077d6e20e0bdb32adfefbec569;p=kernel%2Fkernel-generic.git target/rd: Allow WriteCacheEnabled=1 operation with rd_mcp backends This patch adds the missing rd_mcp_template->write_cache_emulated=1 bit to optionally allow WriteCacheEnabled=1 (WCE) to be enabled for the built-in TCM/rd_mcp backend driver. Tested on v3.6-rc[0,2] code with loopback+tcm_vhost fabric ports. Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c index d00bbe3..58bcc87 100644 --- a/drivers/target/target_core_rd.c +++ b/drivers/target/target_core_rd.c @@ -474,6 +474,7 @@ static int rd_parse_cdb(struct se_cmd *cmd) static struct se_subsystem_api rd_mcp_template = { .name = "rd_mcp", .transport_type = TRANSPORT_PLUGIN_VHBA_VDEV, + .write_cache_emulated = 1, .attach_hba = rd_attach_hba, .detach_hba = rd_detach_hba, .allocate_virtdevice = rd_allocate_virtdevice,