Re: [Nbd] Question about the expected behaviour of nbd-server for async ops
- To: Wouter Verhelst <w@...112...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] Question about the expected behaviour of nbd-server for async ops
- From: Goswin von Brederlow <goswin-v-b@...186...>
- Date: Sun, 29 May 2011 12:20:40 +0200
- Message-id: <87sjrxbyfb.fsf@...860...>
- In-reply-to: <20110529065038.GA25100@...510...> (Wouter Verhelst's message of "Sun, 29 May 2011 08:50:38 +0200")
- References: <87oc2m28o7.fsf@...860...> <6DBA2A6208847F844397DB62@...873...> <20110529065038.GA25100@...510...>
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: