From: Luben Tuikov <ltuikov@yahoo.com>
To: linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH] SCSI/SD: clearer output of disk cache state
Date: Sat, 4 Nov 2006 11:54:08 -0800 (PST) [thread overview]
Message-ID: <335122.2750.qm@web31808.mail.mud.yahoo.com> (raw)
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
drivers/scsi/sd.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
This patch is 8 months old.
Luben
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 9d98723..f157747 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1354,11 +1354,6 @@ sd_read_cache_type(struct scsi_disk *sdk
res = sd_do_mode_sense(sdp, dbd, modepage, buffer, len, &data, &sshdr);
if (scsi_status_is_good(res)) {
- const char *types[] = {
- "write through", "none", "write back",
- "write back, no read (daft)"
- };
- int ct = 0;
int offset = data.header_length + data.block_descriptor_length;
if (offset >= SD_BUF_SIZE - 2) {
@@ -1387,11 +1382,13 @@ sd_read_cache_type(struct scsi_disk *sdk
sdkp->DPOFUA = 0;
}
- ct = sdkp->RCD + 2*sdkp->WCE;
-
- printk(KERN_NOTICE "SCSI device %s: drive cache: %s%s\n",
- diskname, types[ct],
- sdkp->DPOFUA ? " w/ FUA" : "");
+ printk(KERN_NOTICE "SCSI device %s: "
+ "write cache: %s, read cache: %s, %s\n",
+ diskname,
+ sdkp->WCE ? "enabled" : "disabled",
+ sdkp->RCD ? "disabled" : "enabled",
+ sdkp->DPOFUA ? "supports DPO and FUA"
+ : "doesn't support DPO or FUA");
return;
}
--
1.4.3.3.g8478
next reply other threads:[~2006-11-04 19:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-04 19:54 Luben Tuikov [this message]
2006-11-04 20:13 ` [PATCH] SCSI/SD: clearer output of disk cache state Christoph Hellwig
2006-11-04 23:12 ` James Bottomley
2006-11-05 0:45 ` Luben Tuikov
2006-11-05 3:57 ` Jeff Garzik
2006-11-05 5:36 ` James Bottomley
2006-11-05 14:47 ` Douglas Gilbert
2006-11-15 20:26 ` James Bottomley
2006-11-15 20:47 ` Luben Tuikov
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=335122.2750.qm@web31808.mail.mud.yahoo.com \
--to=ltuikov@yahoo.com \
--cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.