> -----Original Message----- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 31 January 2019 15:25 > To: Paul Durrant <paul.durr...@citrix.com> > Cc: qemu-de...@nongnu.org; qemu-block@nongnu.org; xen- > de...@lists.xenproject.org; Stefan Hajnoczi <stefa...@redhat.com>; Stefano > Stabellini <sstabell...@kernel.org>; Kevin Wolf <kw...@redhat.com>; Max > Reitz <mre...@redhat.com> > Subject: Re: [PATCH v2] xen-block: handle resize callback > > On Thu, Jan 31, 2019 at 03:22:18PM +0000, Paul Durrant wrote: > > > -----Original Message----- > > > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > > > Sent: 31 January 2019 15:21 > > > To: Paul Durrant <paul.durr...@citrix.com> > > > Cc: qemu-de...@nongnu.org; qemu-block@nongnu.org; xen- > > > de...@lists.xenproject.org; Stefan Hajnoczi <stefa...@redhat.com>; > Stefano > > > Stabellini <sstabell...@kernel.org>; Kevin Wolf <kw...@redhat.com>; > Max > > > Reitz <mre...@redhat.com> > > > Subject: Re: [PATCH v2] xen-block: handle resize callback > > > > > > On Wed, Jan 30, 2019 at 04:19:48PM +0000, Paul Durrant wrote: > > > > Some frontend drivers will handle dynamic resizing of PV disks, so > set > > > up > > > > the BlockDevOps resize_cb() method during xen_block_realize() to > allow > > > > this to be done. > > > > > > > > Signed-off-by: Paul Durrant <paul.durr...@citrix.com> > > > > --- > > > > > > > > > > + /* > > > > + * Mimic the behaviour of Linux xen-blkback and re-write the > state > > > > + * to trigger the frontend watch. > > > > + */ > > > > + xen_device_backend_set_state(xendev, backend_state); > > > > > > :(, that function doesn't write the state again if it hasn't changed. > > > So in my testing, Linux never did anything. > > > > Gah! I forgot about that. Alright, it's going to have to be a bit more > crude. > > more crude > Yes, I tried to ignore the check in _set_state and end-up > with an infinit loop.
Yes, you would. That check is there for a reason :-) I'll replace the call in xen-block.c with a call to xen_device_backend_printf(). Paul > > -- > Anthony PERARD