Re: [PATCH v2] scsi: ignore Synchronize Cache command failures to keep using drives not supporting it

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

 



Kernel bug filed here:

https://bugzilla.kernel.org/show_bug.cgi?id=203635

On Mon, 09/12/2019 at 11.06 +0100, Guido Trentalancia wrote:
> Many obsolete hard drives do not support the Synchronize Cache SCSI
> command. Such command is generally issued during fsync() calls which
> at the moment therefore fail with the ILLEGAL_REQUEST sense key.
> 
> Since this failure is currently treated as critical in the kernel
> SCSI
> disk driver, such obsolete hard drives cannot be used anymore (at
> least
> since kernel 4.10, maybe even earlier): they cannot be formatted,
> mounted and/or checked using tools such as e2fsprogs.
> 
> Because there is nothing which can be done if the drive does not
> support
> such command, such ILLEGAL_REQUEST should be treated as non-critical
> so
> that the underlying operation does not fail and the obsolete hard
> drive
> can be used normally.
> 
> This second version of the patch (v2) disables the Write Cache
> feature
> as a precaution on hard drives which do not support the Synchronize
> Cache
> command and therefore the cache flushing functionality.
> 
> Although the Write Cache is disabled (v2) when using such hard drives
> which do not feature the Synchronize Cache SCSI command, there is
> still
> some risk of data loss in case of power cuts, USB cable disconnects
> and
> so on, which depend on the drive itself and not on this patch or the
> rest of the kernel code: YOU HAVE BEEN WARNED - THE DRIVE
> MANIFACTURER
> SHOULD HAVE BEEN WARNED YOU IN THE FIRST PLACE - IN DOUBT, UPGRADE TO
> A
> NEWER HARD DRIVE !!
> 
> Tested on a Maxtor OneTouch USB 200Gb External Hard Drive.
> 
> Signed-off-by: Guido Trentalancia <guido@xxxxxxxxxxxxxxxx>
> ---
>  drivers/scsi/sd.c |   29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> [...]



[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