Wouter Verhelst <[email protected]> writes:

> On Sat, May 28, 2011 at 05:35:22PM +0100, Alex Bligh wrote:
>> Goswin,
>> 
>> --On 28 May 2011 16:37:12 +0200 Goswin von Brederlow <[email protected]> 
>> wrote:
>> >   + not NBD_CMD_FLAG_FUA:
>> >     a) reply when the data has been recieved
>> >     b) reply when the data has been commited to cache (write() returned)
>> >     c) reply when the data has been commited to physical medium
>> 
>> You may do any of those. Provided you will write the data "eventually"
>> (i.e. when you receive a REQ_FLUSH or a disconnect).
>> 
>> >     For a+b how does one report write errors that only appear after
>> >     the reply? Report them in the next FLUSH request?
>> 
>> You don't. To be safe, I'd error every write (i.e. turn the medium
>> read only).
>
> I don't think errors that appear after the reply are possible in the
> case of b (they are in the case of a, obviously)? Or what am I missing?

Write returns when the data is in cache. If the physical disk fails on
the write you only get the error on the next fsync() call.

MfG
        Goswin

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to