Bug 203635 - SCSI Disk driver does not support obsolete hard-disk drives that lack the Synchronize Cache command
Summary: SCSI Disk driver does not support obsolete hard-disk drives that lack the Syn...
Status: NEW
Alias: None
Product: SCSI Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 high
Assignee: drivers_other
URL: https://lore.kernel.org/patchwork/pat...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-17 17:34 UTC by Guido Trentalancia
Modified: 2019-12-09 10:11 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.10 to 5.2
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Proposed patch (v2) (3.24 KB, text/plain)
2019-05-17 17:34 UTC, Guido Trentalancia
Details
Proposed patch (v2) (3.34 KB, patch)
2019-12-09 10:11 UTC, Guido Trentalancia
Details | Diff

Description Guido Trentalancia 2019-05-17 17:34:14 UTC
Created attachment 282811 [details]
Proposed patch (v2)

The current Linux kernel SCSI Disk driver does not support obsolete hard-disk drives that lack the Synchronize Cache command.

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.
Comment 1 Guido Trentalancia 2019-12-09 10:11:07 UTC
Created attachment 286233 [details]
Proposed patch (v2)

Proposed patch (v2) - improved patch description

Note You need to log in before you can comment on or make changes to this bug.