linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Guido Trentalancia <guido@trentalancia.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH RESEND v2] scsi: ignore Synchronize Cache command failures to keep using drives not supporting it
Date: Sun, 28 Feb 2021 08:37:03 -0800	[thread overview]
Message-ID: <443d92dd844e329bcd40a1e59b7cc3784ed3db94.camel@HansenPartnership.com> (raw)
In-Reply-To: <1614502908.6594.6.camel@trentalancia.com>

On Sun, 2021-02-28 at 10:01 +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.

It should be that all drives that don't support sync cache also don't
have write back caches, which means we don't try to do a cache sync on
them.  The only time you we ever try to sync the cache is if the device
advertises a write back cache, in which case the sync cache command is
mandatory.

I'm sure some SATA manufacturers somewhere cut enough corners to
produce an illegally spec'd drive like this, but your proposed remedy
is unviable: you can't ignore a cache failure on flush barriers which
will cause data corruption.  You have to disable barriers on the
filesystem to get correct operation and be very careful about power
down.

James



  reply	other threads:[~2021-02-28 16:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-28  9:01 [PATCH RESEND v2] scsi: ignore Synchronize Cache command failures to keep using drives not supporting it Guido Trentalancia
2021-02-28 16:37 ` James Bottomley [this message]
2021-03-01  7:06   ` Guido Trentalancia
2021-03-01  7:38     ` Damien Le Moal
2021-03-01 11:33       ` Guido Trentalancia
2021-03-01 12:27         ` Damien Le Moal
2021-03-01 12:39           ` Guido Trentalancia
2021-03-01 12:51             ` Damien Le Moal
2021-03-01 12:57               ` Guido Trentalancia
2021-03-01 13:04                 ` Damien Le Moal
2021-03-01 13:12                   ` Guido Trentalancia
2021-03-01 12:42           ` Damien Le Moal
2021-03-01 12:52             ` Guido Trentalancia
2021-03-01 12:57               ` Damien Le Moal
2021-03-01 13:05                 ` Guido Trentalancia
2021-03-01 12:07       ` Guido Trentalancia
  -- strict thread matches above, loose matches on Subject: below --
2020-01-02 22:05 Guido Trentalancia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=443d92dd844e329bcd40a1e59b7cc3784ed3db94.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=guido@trentalancia.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).