Re: [PATCH RESEND v2] scsi: ignore Synchronize Cache command failures to keep using drives not supporting it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 01/03/2021 at 12.42 +0000, Damien Le Moal wrote:
> I checked the standards again. It turns out that SYNCHRONIZE CACHE
> command is
> optional in SBC... Aouch. Got so used to have that one on any drive
> that I
> thought it was mandatory.
> 
> Well, it certainly is mandatory if the drive has a write cache, which
> seems to
> be the case for you.
> 
> The problem with your patch though is that you disable write caching
> when you
> see an ILLEGAL REQUEST/INVALID OPCODE termination of synchronize
> cache. Which
> means that the drive was already used, written too and the cache has
> likely
> dirty data and I do not see any method to guarantee that that data
> makes it to
> persistent media before shutdown. Imagine if that was the synchronize
> cache sent
> before shutdown.

As already said, I have tested the patch for over a year now and I have
never experienced the problem that you are foreseeing !

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.

> So the only reasonable solution for such drive is to use it with
> write cache
> disabled from the start.
> down.

It works well even with write caching enabled.

If you have an alternative patch to propose, go ahead otherwise I would
push for getting this merged and sorting out the issue for good.

Guido



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux