Re: [Nbd] [PATCH] Only send one reply on oversize writes
- To: Alex Bligh <alex@...872...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] [PATCH] Only send one reply on oversize writes
- From: Wouter Verhelst <w@...112...>
- Date: Sat, 28 May 2011 12:55:56 +0200
- Message-id: <20110528105556.GI10543@...510...>
- In-reply-to: <5DA2DC50EEB2FE1A65B357A5@...874...>
- References: <1306560268-19484-1-git-send-email-alex@...872...> <20110528085523.GC32221@...510...> <33FC6E538A76BA35B1D798B4@...874...> <20110528101214.GA9316@...510...> <5DA2DC50EEB2FE1A65B357A5@...874...>
On Sat, May 28, 2011 at 11:47:16AM +0100, Alex Bligh wrote:
> Wouter,
>
> --On 28 May 2011 12:12:14 +0200 Wouter Verhelst <w@...112...> wrote:
>
> > What about a hash table instead? There's a GHashTable in libglib-2.0,
> > which we're already using.
>
> That looks promising.
>
> > That would also allow reusing the original
> > handle number, which would make it slightly easier to match against
> > what's in the transaction log.
>
> That won't work. Consider the original sequence
> Request Reply
> H1
> H2
> H2
> H1
> H1
> H1
>
> where H1 gets reused. I could (in fact probably would) replay this as
> Request Reply
> H1
> H2
> H1
> H2
> H1
> H1
Point; hadn't thought of that.
> in which case there are 2 H1s in flight, and I won't be able to match
> up the replies.
>
> I could however use (e.g.) the seek offset as the handle, and store
> the original handle.
There's nothing to say that the seek offset won't be duplicated, either.
Probably best to create our own handles, indeed.
--
The volume of a pizza of thickness a and radius z can be described by
the following formula:
pi zz a
Reply to: