Message ID | 3365a9a1-92c0-8917-1632-b88f1c055392@suse.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | IOREQ: mapcache invalidation request sending corrections | expand |
> -----Original Message----- > From: Jan Beulich <jbeulich@suse.com> > Sent: 02 February 2021 15:14 > To: xen-devel@lists.xenproject.org > Cc: Paul Durrant <paul@xen.org>; George Dunlap <george.dunlap@citrix.com> > Subject: [PATCH v2 1/2] IOREQ: fix waiting for broadcast completion > > Checking just a single server is not enough - all of them must have > signaled that they're done processing the request. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Paul Durrant <paul@xen.org> > --- > v2: New. > > --- a/xen/common/ioreq.c > +++ b/xen/common/ioreq.c > @@ -213,9 +213,9 @@ bool vcpu_ioreq_handle_completion(struct > return false; > } > > - sv = get_pending_vcpu(v, &s); > - if ( sv && !wait_for_io(sv, get_ioreq(s, v)) ) > - return false; > + while ( (sv = get_pending_vcpu(v, &s)) != NULL ) > + if ( !wait_for_io(sv, get_ioreq(s, v)) ) > + return false; > > vio->req.state = ioreq_needs_completion(&vio->req) ? > STATE_IORESP_READY : STATE_IOREQ_NONE;
--- a/xen/common/ioreq.c +++ b/xen/common/ioreq.c @@ -213,9 +213,9 @@ bool vcpu_ioreq_handle_completion(struct return false; } - sv = get_pending_vcpu(v, &s); - if ( sv && !wait_for_io(sv, get_ioreq(s, v)) ) - return false; + while ( (sv = get_pending_vcpu(v, &s)) != NULL ) + if ( !wait_for_io(sv, get_ioreq(s, v)) ) + return false; vio->req.state = ioreq_needs_completion(&vio->req) ? STATE_IORESP_READY : STATE_IOREQ_NONE;
Checking just a single server is not enough - all of them must have signaled that they're done processing the request. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- v2: New.