linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target: For iblock at default writecache enable.
@ 2013-01-25  1:58 majianpeng
  2013-01-29 19:03 ` Nicholas A. Bellinger
  0 siblings, 1 reply; 6+ messages in thread
From: majianpeng @ 2013-01-25  1:58 UTC (permalink / raw)
  To: nab; +Cc: linux-scsi, target-devel

Like the harddisk, at default write cache is enable.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
 drivers/target/target_core_iblock.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index b526d23..69c2f2d 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -125,6 +125,9 @@ static int iblock_configure_device(struct se_device *dev)
 	dev->dev_attrib.hw_max_sectors = UINT_MAX;
 	dev->dev_attrib.hw_queue_depth = q->nr_requests;
 
+	/*Default enable write cache*/
+	dev->dev_attrib.emulate_write_cache = 1;
+
 	/*
 	 * Check if the underlying struct block_device request_queue supports
 	 * the QUEUE_FLAG_DISCARD bit for UNMAP/WRITE_SAME in SCSI + TRIM
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-30  7:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25  1:58 [PATCH] target: For iblock at default writecache enable majianpeng
2013-01-29 19:03 ` Nicholas A. Bellinger
2013-01-29 23:04   ` Andy Grover
2013-01-29 23:14     ` Nicholas A. Bellinger
2013-01-30  1:19       ` majianpeng
2013-01-30  7:29         ` Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).