Am 18.12.2019 um 17:43 hat Paolo Bonzini geschrieben:
> On 18/12/19 17:37, Kevin Wolf wrote:
> >>       * passthrough flags.  */
> >> -    assert(!(flags & ~(BDRV_REQ_NO_SERIALISING | BDRV_REQ_COPY_ON_READ |
> >> -                       BDRV_REQ_PREFETCH)));
> >> +    assert(!(flags & ~(BDRV_REQ_COPY_ON_READ | BDRV_REQ_PREFETCH)));
> >>  
> >>      /* Handle Copy on Read and associated serialisation */
> >>      if (flags & BDRV_REQ_COPY_ON_READ) {
> >> @@ -1458,12 +1457,7 @@ static int coroutine_fn 
> >> bdrv_aligned_preadv(BdrvChild *child,
> >>          bdrv_mark_request_serialising(req, bdrv_get_cluster_size(bs));
> >>      }
> >>  
> >> -    /* BDRV_REQ_SERIALISING is only for write operation */
> >> -    assert(!(flags & BDRV_REQ_SERIALISING));
> > I think we shoud still keep this assertion as long as read requests
> > don't mark themselves as serialising when BDRV_REQ_SERIALISING is given.
> > Otherwise, someone might add the flag to a read request and will later
> > be surprised that it didn't work.
> 
> I'm removing it because it's anyway tested by the earlier
> 
>     assert(!(flags & ~(BDRV_REQ_COPY_ON_READ | BDRV_REQ_PREFETCH)));

Ah, right. Never mind then.

Kevin


Reply via email to