Re: [Nbd] libnbd
- To: Wouter Verhelst <w@...112...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] libnbd
- From: Alex Bligh <alex@...872...>
- Date: Mon, 29 Apr 2013 15:51:49 +0100
- Message-id: <2FBED536-A47C-4542-8DAB-A12767B2E283@...872...>
- In-reply-to: <517E5942.9030600@...112...>
- References: <516FBEB3.3070806@...112...> <20130425121417.GB15210@...1266...> <517926C9.4000804@...112...> <20130425144930.GC15210@...1266...> <51795C39.80103@...112...> <20130429094559.GC6252@...1266...> <517E5942.9030600@...112...>
On 29 Apr 2013, at 12:28, Wouter Verhelst wrote:
> In my view, the select loop would:
> - Read a request header into a struct nbd_request, and parse it (i.e.,
> call ntoh* on the right variables of the struct that we read the header
> into)
> - Figure out if the request is followed by data; if so, read that data
> from the socket
>From past experience writing a server, you might want to ask the
driver for buffer(s) to put this in rather than allocate them yourself.
For instance, a driver with an O_DIRECT backend would want to page
align the buffers.
--
Alex Bligh
Reply to: