tech-kern archive

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

Re: WAPBL/cache flush and mfi(4)



On Fri, Aug 24, 2012 at 11:24:33PM +0200, Michael van Elst wrote:
> On Fri, Aug 24, 2012 at 08:52:06PM +0200, Manuel Bouyer wrote:
> > 
> > > The standard drivers always turn off write caching when the BBU
> > > is not working.
> > 
> > No, this is something the user can control directly in firmware,
> > at last with mfi(4) controllers.
> 
> Depends on the firmware, I have seen such controllers rejecting the
> request to enable the write cache without BBU. Obviously you can
> create configurations on some firmware versions that are not save,
> but that's clearly printed in the firmware documentation.

Hum, the documentation for the 9265 makes running the a BBU or with
an UPS equivalent, which is not really true.

> 
> I wouldn't care much about the non-BBU/write-cache case anyway. It
> is inherently unsafe, wether you flush the cache or not, in particular
> WAPBL doesn't help at all.

With the cache flush, WAPBL at last can avoid the filesystem metadata
corruption, isn't it ? otherwise the cache flush is useless and we should
turn it off.

> 
> N.B. Can't a driver flush caches when shutting down or suspending
> through the pmf framework?

It can, of course. right now MFI doesn't do that, but it's something
to look at. Also, on shutdown, the driver should put the cache in
sleep state, to preserve bbu once power is removed. I know there are
commands for this, but some reverse-engineering is needed.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index