Re: [Nbd] [PATCH v2] doc: Add new NBD_REP_INFO reply, for advertising block size
- To: Eric Blake <eblake@...696...>
- Cc: "nbd-general@lists.sourceforge.net" <nbd-general@lists.sourceforge.net>
- Subject: Re: [Nbd] [PATCH v2] doc: Add new NBD_REP_INFO reply, for advertising block size
- From: Alex Bligh <alex@...872...>
- Date: Wed, 13 Apr 2016 12:44:12 +0100
- Message-id: <2B85E593-70E8-4FE6-BA8E-4855DE238A6E@...872...>
- In-reply-to: <1460506614-31604-1-git-send-email-eblake@...696...>
- References: <1460506614-31604-1-git-send-email-eblake@...696...>
On 13 Apr 2016, at 01:16, Eric Blake <eblake@...696...> wrote:
> +The minimum block size represents the smallest addressable length and
> +alignment within the export, although writing to an area that small
> +may require the server to use a less-efficient read-modify-write
> +action.
Having thought a bit more about this, I think we might (after all)
need a client flag which says "I respect minimum block sizes"
or "I respect block sizes" very early on in the negotiation.
The reason why is this.
Let's suppose I have a file backed NBD server. I'd really like
to open my files with O_DIRECT in order to gain performance, but
to do so I need to (a) advertise a minimum block size of 4096,
and (b) (crucially) know the client will respect that. If
my client doesn't tell me that, I'd open without O_DIRECT.
Thoughts?
--
Alex Bligh
Reply to: