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.
Created attachment 286233 [details] Proposed patch (v2) Proposed patch (v2) - improved patch description