linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guido Trentalancia <guido@trentalancia.com>
To: Damien Le Moal <Damien.LeMoal@wdc.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH RESEND v2] scsi: ignore Synchronize Cache command failures to keep using drives not supporting it
Date: Mon, 01 Mar 2021 14:05:13 +0100	[thread overview]
Message-ID: <1614603913.6918.24.camel@trentalancia.com> (raw)
In-Reply-To: <BL0PR04MB65140D17E1F922C72902D107E79A9@BL0PR04MB6514.namprd04.prod.outlook.com>

On Mon, 01/03/2021 at 12.57 +0000, Damien Le Moal wrote:
> On 2021/03/01 21:52, Guido Trentalancia wrote:
> > As already said, I have tested the patch for over a year now and I
> > have
> > never experienced the problem that you are foreseeing !
> 
> That may be true for your specific drive, but since we are in
> uncharted
> (non-standard) territory here, we cannot say that this will hold for
> all such
> weird drives out there.

I do not work in the hard drive industry, so I cannot make assumptions
about all existing models.

All patches should normally undergo further testing and this is no
exception.

I would stress once again that the proposed patch disables write
caching as soon as it realizes that the drive does not support the Sync
Cache command, so it has been designed to be extra safe.

> > The current alternative is data corruption each time that the drive
> > is
> > mounted and the inability to use it.
> > 
> > So, the patch is the way forward for using such drives plug and
> > play
> > without cumbersome configuration such as disabling the write cache,
> > which advanced users can always make.

[...]

> As mentioned, the alternative is a udev rule to disable write cache.
> Or if the
> drive supports that, permanently save WCE=0 setting in the drive
> config so that
> it always come up with write cache disabled. No kernel patch needed,
> and you
> will note that this is also exactly the same as what your patch does,
> without
> waiting for an error.

The above is cumbersome, the kernel should support such drives plug and
play, without causing data corruption which is happening at the moment.

Guido

  reply	other threads:[~2021-03-01 13:05 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
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 [this message]
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=1614603913.6918.24.camel@trentalancia.com \
    --to=guido@trentalancia.com \
    --cc=Damien.LeMoal@wdc.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).