<div dir="ltr">On Mon, Jun 17, 2013 at 6:29 AM, Joe Thornber <span dir="ltr"><<a href="mailto:thornber@redhat.com" target="_blank">thornber@redhat.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On Tue, Jun 11, 2013 at 03:05:07PM +0000, OS Engineering wrote:<br>

<br>
...<br>
<br>
> Dm-cache commits on-disk metadata every time a REQ_SYNC or REQ_FUA<br>
> bio is written. If no such requests are made then it commits<br>
> metadata once every second. If power is lost, it may lose some<br>
> recent writes.<br>
<br>
Not true (though it is true for thinp, which may be where you got this<br>
idea?).  For caching we have to commit whenever data is moved about,<br>
otherwise a crash could result in us reading data that is not just out<br>
of date (acceptable for some), but used to belong to a totally<br>
different part of the device (always unacceptable).<br>
<br>
- Joe<br></blockquote><div><br></div><div><br></div><div style>Hi Joe,</div><div style><br></div><div style>In Documentation/device-mapper/cache.txt, is this text out of date?</div><div style><br></div><div style>     On-disk metadata is committed every time a REQ_SYNC or REQ_FUA<br>
</div><div>     bio is written.  If no such requests are made then commits will</div><div>     occur every second.  This means the cache behaves like a physical</div><div>     disk that has a write cache (the same is true of the</div>
<div>     thin-provisioning target).  If power is lost you may lose some</div><div>     recent writes.  The metadata should always be consistent in spite</div><div>     of any crash.</div><div><br></div><div style>You say that this is the case for thinp, however.  Does that mean that it's not possible to get stable writes with dm-thin without using cache-control commands?  I don't see any documentation to this effect.  If so, are there any plans to change this behavior (or make it configurable)?</div>
<div style><br></div><div style>Thanks,</div><div style>-Michael</div><div style><br></div></div></div></div>