scsi: fix internal write cache issue on usb hdd.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v1 posting 2/23 patches 4 repliesIn review
- v4 Latest posting 2/23 patches 3 repliesIn review
- v4 posting 1/23 patches 3 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 1 of 3 patches | 4 replies | Superseded | |
| v2 | 0 of 3 patches | 0 replies | Superseded | |
| v1 posting 1/2 | 3 patches | 7 replies | Superseded |
Patches in v4 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | scsi: set to WCE if usb cache quirk is present.drivers/ include/ | +8 | 0 replies | |
| 2/3 | usb: storage: add support for write cache quirk onDocumentation/ drivers/ drivers/ +1 more | +14 | 0 replies | |
| 3/3 | usb: storage: update usb devices for write cache quirk in quirk list.drivers/ | +12 | 0 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Alan Stern |
|---|---|
| 1/3 | |
| 2/3 | A-b |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/3] scsi: fix internal write cache issue on usb hdd.
From: Namjae Jeon <[email protected]>
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, #58) 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'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.
scsi: set to WCE if usb cache quirk is present.
usb: storage: add support for write cache quirk on usb hdd.
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(-)
Signature · 1 line
1.7.9.5