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(+) > [...]