Re: [PATCH V2] sd: Reduce log level to KERN_NOTICE for missing caching mode page

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

 



On 06/02/2014 09:14 PM, James Bottomley wrote:
On Mon, 2014-06-02 at 20:48 +0200, Alain Kalker wrote:
Reduce the lernel log level to KERN_NOTICE for messages related
to a missing caching mode page.

Reasons why I think this change is justified:
- The condition is not an error; the existing workaround of assuming
   a write through cache doesn't limit functionality in any way.

That's not actually correct.  The condition may be an error.  We have
some USB attached storage devices with writeback caches which don't
supply caching information.  Treating a writeback device as writethrough
is a potential error because you may lose data as a result of it.

Aha, I thought that the write through treatment would always make sure that the device has written all the data before returning. If that's not always true, then I agree that the condition could be an error.

The error is that we've made an assumption which may damage your data.

The problem for us is that we can't tell if the assumption is going to
be fatal or not ... the message is harmless for older USB devices.

I think that I wrongly assumed that only (older?) writethrough devices might not return caching information. If there are also writeback devices which don't return (correct) information, then I have to agree.

- It doesn't warrant a warning either: as it is most likely
   a hardware limitation, there is little that an ordinary user can do
   about it besides replacing the affected hardware.
   Making it a warning would still break quiet boot (kernel commandline
   parameter 'quiet'), and may still trip log monitoring software
   unneccessarily, either on every boot or whenever an affected
   external device is plugged in.
- It should be a notice, for it is a normal but significant condition,
   as it may impact write performance. This would bring it on par with
   the log messages in the same function.

But this message may serve a purpose:  If you see it and you find you do
have a USB device with a writeback cache, you can set the boot system to
correct the cache type assumption and we'll send the correcting
synchronize cache commands.

Very informative, thanks!
I do think that this should be documented somewhere, especially with regard to the risk of data loss. People might think that falling back on writethrough is always a 'safe bet' where it actually might not be.

It certainly helps bug triagers identify issues which may require adding
a particular device to the list that need to be treated as writeback.

Thanks for your feedback, much appreciated.

Alain
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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