Re: [PATCH 1/1] scsi: retrieve cache mode using ATA_16 if normal routine fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-12-12 at 16:48 +0530, Amit Sahrawat wrote:
> It has been observed that a number of USB HDD's do not respond correctly
> to SCSI mode sense command(retrieve caching pages) which results in their
> Write Cache being discarded by queue requests i.e., WCE if left set to
> '0'(disabled).
> This results in a number of Filesystem corruptions, when the device
> is unplugged abruptly.

Um, how would knowing the caching type correctly help?  If you surprise
unplug the device, we can't send a flush to it anyway ...

> So, in order to identify the devices correctly - give it
> a last try using ATA_16 after failure from normal routine.
> Introduce a mechanism to store write-cache type using /sys/class/
> interface, so that the normal code continues to function without errors.
> 
> Signed-off-by: Amit Sahrawat <amit.sahrawat83@xxxxxxxxx>
> Signed-off-by: Nam-Jae Jeon <namjae.jeon@xxxxxxxxxxx>

This whole patch looks like a layering violation.  Why not just update
the SAT layer to translate the MODE SENSE correctly?

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux