At Thu, 25 Jul 2013 17:04:53 +0800, Liu Yuan wrote: > > > > > +/* > > + * Check whether the specified acb can be canceled > > + * > > + * We can cancel aio when any request belonging to the acb is: > > + * - Not processed by the sheepdog server. > > + * - Not linked to the inflight queue. > > + */ > > +static bool sd_acb_cancelable(const SheepdogAIOCB *acb) > > +{ > > + BDRVSheepdogState *s = acb->common.bs->opaque; > > + AIOReq *aioreq; > > + > > + if (!acb->cancelable) { > > + return false; > > + } > > + > > + QLIST_FOREACH(aioreq, &s->inflight_aio_head, aio_siblings) { > > + if (aioreq->aiocb == acb) { > > + return false; > > + } > > + } > > + > > + return false; > > return true; ?
Oops, thanks for the catch! Thanks, Kazutaka