Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-20 Thread Eric Blake
On 01/20/2017 12:00 PM, Alex Bligh wrote: > >> On 20 Jan 2017, at 17:04, Vladimir Sementsov-Ogievskiy >> wrote: >> >> About extents: is 32bit length enough? We will have to send 4096 for empty >> 16tb disk.. > > The nbd protocol uniformly uses 32 bit lengths (for

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-20 Thread Alex Bligh
> On 20 Jan 2017, at 17:04, Vladimir Sementsov-Ogievskiy > wrote: > > About extents: is 32bit length enough? We will have to send 4096 for empty > 16tb disk.. The nbd protocol uniformly uses 32 bit lengths (for better or for worse). This is baked into the

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-20 Thread Vladimir Sementsov-Ogievskiy
About extents: is 32bit length enough? We will have to send 4096 for empty 16tb disk.. -- Best regards, Vladimir

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-16 Thread Vladimir Sementsov-Ogievskiy
13.01.2017 13:29, Alex Bligh wrote: On 13 Jan 2017, at 09:48, Vladimir Sementsov-Ogievskiy wrote: 12.01.2017 16:11, Alex Bligh wrote: On 12 Jan 2017, at 07:05, Vladimir Sementsov-Ogievskiy wrote: Yes this is better. But is it actually

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-13 Thread Alex Bligh
> On 13 Jan 2017, at 09:48, Vladimir Sementsov-Ogievskiy > wrote: > > 12.01.2017 16:11, Alex Bligh wrote: >>> On 12 Jan 2017, at 07:05, Vladimir Sementsov-Ogievskiy >>> wrote: >>> >>> Yes this is better. But is it actually needed to force

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-13 Thread Vladimir Sementsov-Ogievskiy
12.01.2017 16:11, Alex Bligh wrote: On 12 Jan 2017, at 07:05, Vladimir Sementsov-Ogievskiy wrote: Yes this is better. But is it actually needed to force contexts have some safe default? If context wants it may define such default without this requirement.. So,

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-12 Thread Alex Bligh
> On 12 Jan 2017, at 11:43, Vladimir Sementsov-Ogievskiy > wrote: > > From "NBD_OPT_LIST_META_CONTEXT (9)": >> The server MUST either reply with an error (for instance EINVAL if the >> option is not supported), or reply with a list of NBD_REP_META_CONTEXT >> replies

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-12 Thread Alex Bligh
> On 12 Jan 2017, at 07:05, Vladimir Sementsov-Ogievskiy > wrote: > > Yes this is better. But is it actually needed to force contexts have some > safe default? If context wants it may define such default without this > requirement.. So, should it be requirement at

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-12 Thread Vladimir Sementsov-Ogievskiy
(Sorry, it may be a bit out of topic, but I hope it is comfortable for all that I just comment current version of the feature by answering cover letter of last related patch set) From |"NBD_OPT_LIST_META_CONTEXT| (9)": The server MUST either reply with an error (for instance |EINVAL| if the

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2017 22:00, Alex Bligh wrote: On 11 Jan 2017, at 15:31, Vladimir Sementsov-Ogievskiy wrote: If an error occurs, the server SHOULD set the appropriate error code in the error field of an error chunk. However, if the error does not involve invalid usage (such

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-11 Thread Alex Bligh
> On 11 Jan 2017, at 15:31, Vladimir Sementsov-Ogievskiy > wrote: > > >>> If an error occurs, the server SHOULD set the appropriate error code in > >>> the error field of an error chunk. However, if the error does not involve > >>> invalid usage (such as a request

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-11 Thread Vladimir Sementsov-Ogievskiy
from current version: >>> If an error occurs, the server SHOULD set the appropriate error code in the error field of an error chunk. However, if the error does not involve invalid usage (such as a request beyond the bounds of the file), a server MAY reply with a single block status descriptor

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-29 Thread Alex Bligh
> On 27 Dec 2016, at 14:09, Vladimir Sementsov-Ogievskiy > wrote: > > What was the reason for it? Why not to negotiate forced structured read > separately? Actually, this spec forces any server, which wants to implement > structured reply implement structured read

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-27 Thread Eric Blake
On 12/27/2016 08:09 AM, Vladimir Sementsov-Ogievskiy wrote: > A bit out of topic, but... > >> structured replies via `NBD_OPT_STRUCTURED_REPLY`. Conversely, if >> structured replies are negotiated, the server MUST use a >> structured reply for any response with a payload, and MUST NOT use >> a

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-27 Thread Vladimir Sementsov-Ogievskiy
A bit out of topic, but... structured replies via `NBD_OPT_STRUCTURED_REPLY`. Conversely, if structured replies are negotiated, the server MUST use a structured reply for any response with a payload, and MUST NOT use a simple reply for `NBD_CMD_READ` (even for the case of an early `EINVAL` due

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-26 Thread Vladimir Sementsov-Ogievskiy
14.12.2016 21:17, Alex Bligh wrote: On 14 Dec 2016, at 17:55, Vladimir Sementsov-Ogievskiy wrote: Hmmm... Well in the '*' case, it's up to the namespace as to how it parses things, so '*' could be prohibited entirely or mean 'return the first 20 matching' or

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-14 Thread Alex Bligh
> On 14 Dec 2016, at 17:55, Vladimir Sementsov-Ogievskiy > wrote: > >> Hmmm... Well in the '*' case, it's up to the namespace as to how it parses >> things, so '*' could be prohibited entirely or mean 'return the first 20 >> matching' or similar. So that's less of a

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-14 Thread Vladimir Sementsov-Ogievskiy
14.12.2016 20:36, Alex Bligh wrote: On 14 Dec 2016, at 17:05, Vladimir Sementsov-Ogievskiy wrote: However, this raises another question. Wouter deliberately made the query format freeform so that you could e.g. set a context like: backup:modtime>201612081034

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-14 Thread Vladimir Sementsov-Ogievskiy
14.12.2016 19:38, Alex Bligh wrote: Vladimir, +non-zero number of metadata contexts during negotiation. Servers SHOULD +reply to clients sending `NBD_CMD_BLOCK_STATUS without backquote Fixed +If zero queries are sent, then the server MUST return all +the metadata contexts it knows

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-14 Thread Alex Bligh
> On 14 Dec 2016, at 17:05, Vladimir Sementsov-Ogievskiy > wrote: >> >> However, this raises another question. Wouter deliberately made the >> query format freeform so that you could e.g. set a context like: >> >>backup:modtime>201612081034 >> >> which might (in

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-14 Thread Alex Bligh
> On 14 Dec 2016, at 16:58, Eric Blake wrote: > > s/botht he/both the/ Thanks - fixed -- Alex Bligh signature.asc Description: Message signed with OpenPGP using GPGMail

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-14 Thread Eric Blake
On 12/14/2016 09:08 AM, Alex Bligh wrote: > (NB: I've already applied this and pushed it) > > * Change NBD_OPT_LIST_METADATA etc. to explicitly send a list of queries > and add a count of queries so we can extend the command later (rather than > rely on the length of option) > > * For

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-14 Thread Alex Bligh
Vladimir, >> +non-zero number of metadata contexts during negotiation. Servers SHOULD >> +reply to clients sending `NBD_CMD_BLOCK_STATUS without > > backquote Fixed >> +If zero queries are sent, then the server MUST return all >> +the metadata contexts it knows about. > > I think that

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-14 Thread Vladimir Sementsov-Ogievskiy
14.12.2016 18:08, Alex Bligh wrote: (NB: I've already applied this and pushed it) * Change NBD_OPT_LIST_METADATA etc. to explicitly send a list of queries and add a count of queries so we can extend the command later (rather than rely on the length of option) * For NBD_OPT_LIST_METADATA

[Qemu-devel] [PATCH] Further tidy-up on block status

2016-12-14 Thread Alex Bligh
(NB: I've already applied this and pushed it) * Change NBD_OPT_LIST_METADATA etc. to explicitly send a list of queries and add a count of queries so we can extend the command later (rather than rely on the length of option) * For NBD_OPT_LIST_METADATA make absence of any query (as opposed to