From: Namjae Jeon <linkinjeon@gmail.com>
To: James.Bottomley@HansenPartnership.com,
gregkh@linuxfoundation.org, mdharm-usb@one-eyed-alien.net,
stern@rowland.harvard.edu, sshtylyov@mvista.com,
bvanassche@acm.org, akpm@linux-foundation.org
Cc: linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, Namjae Jeon <linkinjeon@gmail.com>,
Namjae Jeon <namjae.jeon@samsung.com>
Subject: [PATCH RESEND 0/3] scsi: fix internal write cache issue on usb hdd.
Date: Sat, 7 Jul 2012 23:04:45 -0400 [thread overview]
Message-ID: <1341716685-6631-1-git-send-email-linkinjeon@gmail.com> (raw)
From: Namjae Jeon <namjae.jeon@samsung.com>
The numbers of USB HDDs(All USB HDD I checked) does not respond
correctly to scsi mode sense command for retrieving the write cache
page status. Even though write cache is enabled by default, due to
scsi driver assume that cache is not enabled which in turn might lead
to loss of data since data still will be in cache.
This result that all filesystems is not stable on USB HDD when the
device is unplugged abruptly, even though these are having journaling
feature. Our first trying is that scsi driver send ATA command
(ATA Pass through, #85) to USB HDD after failure from normal routine to
know write cache enable.
We have known it is dangerous after testing several USB HDD. some of
HDD is stalled by this command(A-DATA HDD). So we tried to make the
patch James Bottomley's suggestion(usb quirk) on version 2 that add
product ID and verdor ID of USB HDD to USB quirk list after checking
write cache.
All filesystem will be stable on USB HDD registered in quirk list.
And it will be updated continuously.
Namjae Jeon (3):
scsi: set to WCE if usb cache quirk is present.
usb: storage: add support for write cache quirk.
usb: storage: update usb devices for write cache quirk in quirk.
drivers/scsi/sd.c | 9 +++++++--
include/scsi/scsi_device.h | 1 +
drivers/usb/storage/scsiglue.c | 5 +++++
drivers/usb/storage/usb.c | 5 ++++-
include/linux/usb_usual.h | 4 +++-
drivers/usb/storage/unusual_devs.h | 24 ++++++++++++++++++++++++
Documentation/kernel-parameters.txt | 2 ++
7 files changed, 46 insertions(+), 4 deletions(-)
--
1.7.9.5
next reply other threads:[~2012-07-08 3:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-08 3:04 Namjae Jeon [this message]
2012-07-16 23:48 ` [PATCH RESEND 0/3] scsi: fix internal write cache issue on usb hdd Greg KH
[not found] ` <20120716234805.GA9875-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2012-07-17 7:19 ` James Bottomley
2012-07-17 15:46 ` Greg KH
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=1341716685-6631-1-git-send-email-linkinjeon@gmail.com \
--to=linkinjeon@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=bvanassche@acm.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--cc=namjae.jeon@samsung.com \
--cc=sshtylyov@mvista.com \
--cc=stern@rowland.harvard.edu \
/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).