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

Re: [Nbd] Question about the expected behaviour of nbd-server for async ops



Wouter Verhelst <w@...112...> 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 <goswin-v-b@...186...> 
>> 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



Reply to: