[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] virtio-blk: undo destructive iov_discard_*() operations
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 2/3] virtio-blk: undo destructive iov_discard_*() operations |
Date: |
Thu, 17 Sep 2020 10:34:50 +0100 |
On Wed, Sep 16, 2020 at 11:38:36PM +0800, Li Qiang wrote:
> Stefan Hajnoczi <stefanha@redhat.com> 于2020年8月12日周三 下午6:51写道:
> > @@ -644,7 +648,8 @@ static int virtio_blk_handle_request(VirtIOBlockReq
> > *req, MultiReqBuffer *mrb)
> > req->in = (void *)in_iov[in_num - 1].iov_base
> > + in_iov[in_num - 1].iov_len
> > - sizeof(struct virtio_blk_inhdr);
> > - iov_discard_back(in_iov, &in_num, sizeof(struct virtio_blk_inhdr));
> > + iov_discard_back_undoable(in_iov, &in_num, sizeof(struct
> > virtio_blk_inhdr),
> > + &req->inhdr_undo);
> >
> > type = virtio_ldl_p(vdev, &req->out.type);
> >
>
> It seems there is another error path need to do the undo operations.
> case VIRTIO_BLK_T_WRITE_ZEROS & ~VIRTIO_BLK_T_OUT
> handler has an error path.
Yes, thank you! I'll fix it in the next revision.
Stefan
signature.asc
Description: PGP signature