Message ID | 1368202225-45798-3-git-send-email-i.mitsyanko@gmail.com |
---|---|
State | New |
Headers | show |
On 10 May 2013 17:10, Igor Mitsyanko <i.mitsyanko@gmail.com> wrote: > Initialize it appropriately when various commands are processed. "tracking", but the commit message doesn't match the patch contents anyway -- should this patch have more content from later patches, or be squashed into one of them? > > Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com> > --- > hw/sd/sd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/sd/sd.c b/hw/sd/sd.c > index 1dd1331..775a55c 100644 > --- a/hw/sd/sd.c > +++ b/hw/sd/sd.c > @@ -116,6 +116,7 @@ struct SDState { > QEMUIOVector qiov; > struct iovec iov; > BlockDriverAIOCB *aiocb; > + uint32_t transf_cnt; How does this work for migration -- are we guaranteed that all outstanding AIO requests complete before we try to migrate? > }; > > static void sd_set_mode(SDState *sd) > -- > 1.8.1.4 > thanks -- PMM
On Fri, Jun 14, 2013 at 12:49:52PM +0100, Peter Maydell wrote: > On 10 May 2013 17:10, Igor Mitsyanko <i.mitsyanko@gmail.com> wrote: > > Initialize it appropriately when various commands are processed. > > "tracking", but the commit message doesn't match the > patch contents anyway -- should this patch have more > content from later patches, or be squashed into one of > them? > > > > > Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com> > > --- > > hw/sd/sd.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/hw/sd/sd.c b/hw/sd/sd.c > > index 1dd1331..775a55c 100644 > > --- a/hw/sd/sd.c > > +++ b/hw/sd/sd.c > > @@ -116,6 +116,7 @@ struct SDState { > > QEMUIOVector qiov; > > struct iovec iov; > > BlockDriverAIOCB *aiocb; > > + uint32_t transf_cnt; > > How does this work for migration -- are we guaranteed that > all outstanding AIO requests complete before we try to > migrate? Migration does bdrv_drain_all() to complete all pending requests (indirectly by pausing the guest in do_vm_stop()). Stefan
Il 17/06/2013 14:30, Stefan Hajnoczi ha scritto: >>> > > @@ -116,6 +116,7 @@ struct SDState { >>> > > QEMUIOVector qiov; >>> > > struct iovec iov; >>> > > BlockDriverAIOCB *aiocb; >>> > > + uint32_t transf_cnt; >> > >> > How does this work for migration -- are we guaranteed that >> > all outstanding AIO requests complete before we try to >> > migrate? > Migration does bdrv_drain_all() to complete all pending requests > (indirectly by pausing the guest in do_vm_stop()). ... and sd.c AFAIR doesn't support rerror/werror so it doesn't have to migrate pending requests. Paolo
diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 1dd1331..775a55c 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -116,6 +116,7 @@ struct SDState { QEMUIOVector qiov; struct iovec iov; BlockDriverAIOCB *aiocb; + uint32_t transf_cnt; }; static void sd_set_mode(SDState *sd)
Initialize it appropriately when various commands are processed. Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com> --- hw/sd/sd.c | 1 + 1 file changed, 1 insertion(+)