Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-11-23 Thread Wouter Verhelst
Ping. Should I write this up as a proper proposal? On Thu, Nov 16, 2017 at 05:20:29PM +0100, Wouter Verhelst wrote: > On Thu, Nov 16, 2017 at 09:30:41AM -0600, Eric Blake wrote: > > On 11/16/2017 03:51 AM, Wouter Verhelst wrote: > > > > >> I also remember from talking with Vladimir during KVM For

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-11-16 Thread Wouter Verhelst
On Thu, Nov 16, 2017 at 09:30:41AM -0600, Eric Blake wrote: > On 11/16/2017 03:51 AM, Wouter Verhelst wrote: > > >> I also remember from talking with Vladimir during KVM Forum last month > >> that one of the shortfalls of the NBD protocol is that you can only ever > >> send a length of up to 32 bi

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-11-16 Thread Eric Blake
On 11/16/2017 03:51 AM, Wouter Verhelst wrote: >> I also remember from talking with Vladimir during KVM Forum last month >> that one of the shortfalls of the NBD protocol is that you can only ever >> send a length of up to 32 bits on the command side (unless we introduce >> structured commands in

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-11-16 Thread Wouter Verhelst
On Tue, Nov 14, 2017 at 01:06:17PM -0600, Eric Blake wrote: > On 11/14/2017 11:37 AM, Wouter Verhelst wrote: > > On Tue, Nov 14, 2017 at 10:41:39AM -0600, Eric Blake wrote: > >> Another thought - with structured replies, we finally have a way to let > >> the client ask for the server to send resize

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-11-14 Thread Eric Blake
On 11/14/2017 11:37 AM, Wouter Verhelst wrote: > On Tue, Nov 14, 2017 at 10:41:39AM -0600, Eric Blake wrote: >> Another thought - with structured replies, we finally have a way to let >> the client ask for the server to send resize information whenever the >> server wants, rather than having to be

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-11-14 Thread Wouter Verhelst
On Tue, Nov 14, 2017 at 10:41:39AM -0600, Eric Blake wrote: > Another thought - with structured replies, we finally have a way to let > the client ask for the server to send resize information whenever the > server wants, rather than having to be polled by a new client request > all the time. This

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-11-14 Thread Eric Blake
[reviving an old thread] On 01/23/2017 08:54 AM, Eric Blake wrote: > I'm still thinking that allowing the client to query the current size is > useful. Over the weekend, I was thinking of SEEK_SET/SEEK_END semantics > (SEEK_CUR doesn't really make sense, since we don't maintain a current > offse

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-01-25 Thread Wouter Verhelst
Hi Eric, On Mon, Jan 23, 2017 at 08:54:48AM -0600, Eric Blake wrote: > On 01/22/2017 05:43 AM, Wouter Verhelst wrote: > > > > Having given this some more thought, I'm not entirely sure anymore that > > an active resize from the NBD layer is necessarily a layering violation. > > There might be oth

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-01-23 Thread Alex Bligh
> On 23 Jan 2017, at 14:54, Eric Blake wrote: > > Thoughts? My main thought is that the purpose of the extension branches is to discuss and come to a consensus over experimental extension protocols. Whilst I think creating a branch should be a lightweight affair (fine), we explicitly say people

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-01-23 Thread Eric Blake
On 01/22/2017 05:43 AM, Wouter Verhelst wrote: > > Having given this some more thought, I'm not entirely sure anymore that > an active resize from the NBD layer is necessarily a layering violation. > There might be other cases where this is useful, and e.g., the Linux > kernel also supports active

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-01-22 Thread Wouter Verhelst
On Sun, Jan 22, 2017 at 06:25:09PM +0800, Bob Chen wrote: > Hi folks, > > My time schedule doesn't allow me to wait for the community's solution, so I > started to work on quick fix, which is to add a 'bdrv_truncate' function to > the > current NBD's BlockDriver. Basically it's an 'active resize'

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-01-22 Thread Bob Chen
Hi folks, My time schedule doesn't allow me to wait for the community's solution, so I started to work on quick fix, which is to add a 'bdrv_truncate' function to the current NBD's BlockDriver. Basically it's an 'active resize' implementation. I also realized that the 'bdrv_truncate' caller stack

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-01-18 Thread Wouter Verhelst
On Mon, Jan 16, 2017 at 01:36:21PM -0600, Eric Blake wrote: > Maybe the structured reply proposal can be extended into this (reserve a > "reply" header that can be issued as many times as desired by the server > without the client ever having issued the request first, and where the > reply never us

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-01-16 Thread Eric Blake
On 01/14/2017 08:45 AM, Wouter Verhelst wrote: > Hi Eric, > > (side note: my mutt tells me that the signature on your message does not > validate. Not sure what's going on, but something you might want to look > into...) Not my fault, but a well-known issue with mailman. It rewrites portions of m

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-01-14 Thread Alex Bligh
> On 14 Jan 2017, at 14:48, Wouter Verhelst wrote: > > On Thu, Jan 12, 2017 at 06:56:42PM +, Alex Bligh wrote: >> My preferred way to do this would be essentially to allow NBD_OPT_INFO >> to be sent (wrapped appropriately) during the main transmission phase. >> That would allow *any* INFO st

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-01-14 Thread Wouter Verhelst
On Thu, Jan 12, 2017 at 06:56:42PM +, Alex Bligh wrote: > My preferred way to do this would be essentially to allow NBD_OPT_INFO > to be sent (wrapped appropriately) during the main transmission phase. > That would allow *any* INFO stuff to be reread. Can you go into a bit more detail how you'

Re: [Qemu-devel] [Nbd] [Qemu-block] How to online resize qemu disk with nbd protocol?

2017-01-14 Thread Wouter Verhelst
Hi Eric, (side note: my mutt tells me that the signature on your message does not validate. Not sure what's going on, but something you might want to look into...) On Thu, Jan 12, 2017 at 12:45:56PM -0600, Eric Blake wrote: > For resize smaller, things are a lot trickier - how do you block access