From: majianpeng <majianpeng@gmail.com>
To: nab <nab@linux-iscsi.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
target-devel <target-devel@vger.kernel.org>
Subject: [PATCH] target: For iblock at default writecache enable.
Date: Fri, 25 Jan 2013 09:58:13 +0800 [thread overview]
Message-ID: <201301250958101278740@gmail.com> (raw)
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
next reply other threads:[~2013-01-25 1:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 1:58 majianpeng [this message]
2013-01-29 19:03 ` [PATCH] target: For iblock at default writecache enable 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201301250958101278740@gmail.com \
--to=majianpeng@gmail.com \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).