* [PATCH RESEND 0/3] scsi: fix internal write cache issue on usb hdd. @ 2012-07-08 3:04 Namjae Jeon 2012-07-16 23:48 ` Greg KH 0 siblings, 1 reply; 4+ messages in thread From: Namjae Jeon @ 2012-07-08 3:04 UTC (permalink / raw) To: James.Bottomley, gregkh, mdharm-usb, stern, sshtylyov, bvanassche, akpm Cc: linux-usb, linux-scsi, linux-kernel, Namjae Jeon, Namjae Jeon 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND 0/3] scsi: fix internal write cache issue on usb hdd. 2012-07-08 3:04 [PATCH RESEND 0/3] scsi: fix internal write cache issue on usb hdd Namjae Jeon @ 2012-07-16 23:48 ` Greg KH [not found] ` <20120716234805.GA9875-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Greg KH @ 2012-07-16 23:48 UTC (permalink / raw) To: Namjae Jeon Cc: James.Bottomley, mdharm-usb, stern, sshtylyov, bvanassche, akpm, linux-usb, linux-scsi, linux-kernel, Namjae Jeon On Sat, Jul 07, 2012 at 11:04:45PM -0400, Namjae Jeon wrote: > 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. Now applied to the usb-next branch. thanks, greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20120716234805.GA9875-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH RESEND 0/3] scsi: fix internal write cache issue on usb hdd. [not found] ` <20120716234805.GA9875-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> @ 2012-07-17 7:19 ` James Bottomley 2012-07-17 15:46 ` Greg KH 0 siblings, 1 reply; 4+ messages in thread From: James Bottomley @ 2012-07-17 7:19 UTC (permalink / raw) To: Greg KH Cc: Namjae Jeon, mdharm-usb-JGfshJpz5UybPZpvUQj5UqxOck334EZe, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, sshtylyov-Igf4POYTYCDQT0dZR+AlfA, bvanassche-HInyCGIudOg, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Namjae Jeon On Mon, 2012-07-16 at 16:48 -0700, Greg KH wrote: > On Sat, Jul 07, 2012 at 11:04:45PM -0400, Namjae Jeon wrote: > > From: Namjae Jeon <namjae.jeon-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> > > > > 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. > > Now applied to the usb-next branch. It's been in scsi#misc for ten days with no problems. Lets leave it there rather than create merge and rebase issues. Thanks, James -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND 0/3] scsi: fix internal write cache issue on usb hdd. 2012-07-17 7:19 ` James Bottomley @ 2012-07-17 15:46 ` Greg KH 0 siblings, 0 replies; 4+ messages in thread From: Greg KH @ 2012-07-17 15:46 UTC (permalink / raw) To: James Bottomley Cc: Namjae Jeon, mdharm-usb, stern, sshtylyov, bvanassche, akpm, linux-usb, linux-scsi, linux-kernel, Namjae Jeon On Tue, Jul 17, 2012 at 08:19:14AM +0100, James Bottomley wrote: > On Mon, 2012-07-16 at 16:48 -0700, Greg KH wrote: > > On Sat, Jul 07, 2012 at 11:04:45PM -0400, Namjae Jeon wrote: > > > 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. > > > > Now applied to the usb-next branch. > > It's been in scsi#misc for ten days with no problems. Lets leave it > there rather than create merge and rebase issues. No need for rebasing. It's already in my tree, so we can handle the merge when this hits Linus's tree. thanks, greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-17 15:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-08 3:04 [PATCH RESEND 0/3] scsi: fix internal write cache issue on usb hdd Namjae Jeon
2012-07-16 23:48 ` 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
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).