Re: [Nbd] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension
- To: Alex Bligh <alex@...872...>
- Cc: "nbd-general@lists.sourceforge.net" <nbd-general@lists.sourceforge.net>, Kevin Wolf <kwolf@...696...>, "qemu-devel@...530..." <qemu-devel@...530...>, "Stefan stefanha@...2321... com" <stefanha@...696...>, "Denis V. Lunev" <den@...2317...>, Wouter Verhelst <w@...112...>
- Subject: Re: [Nbd] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension
- From: Paolo Bonzini <pbonzini@...696...>
- Date: Thu, 24 Mar 2016 14:32:25 +0100
- Message-id: <56F3EC69.8090204@...696...>
- In-reply-to: <AC5E953A-C302-4B42-9E25-6A89F5B3D985@...872...>
- References: <1458742562-30624-1-git-send-email-den@...2317...> <1458742562-30624-3-git-send-email-den@...2317...> <20160323175834.GC2467@...3...> <20160324084318.GC24831@...2346...> <20160324093315.GA2870@...3...> <433C735B-1BAE-47DA-9543-2E5BA2710357@...872...> <56F3D664.9010700@...696...> <6045D693-ADB5-4031-852B-CD9FA9BA8156@...872...> <56F3DE52.7060502@...696...> <AC5E953A-C302-4B42-9E25-6A89F5B3D985@...872...>
On 24/03/2016 14:31, Alex Bligh wrote:
> Sorry, I should have been clearer on the states:
>
> bits
> 210
>
> 1-- Unallocated, and hence reads as zero
> -1- Allocated, and reads as zero
> --1 Allocated, and reads as non-zero
>
> So 100 means 'definitely unallocated, will read as zero'.
>
> If you are saying that there is also a state called 'Unallocated, but reads
> as non-zero',
Yes.
> that could be handled by adding a fourth bit. Same idea. One
> would presume this would only ever be set in conjunction with bit 2.
> My point in general was to represent all the possible states and let the client
> determine what it wants to do with the information.
This seems overengineered...
Paolo
Reply to: