[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 5/5] replay: introduce block devices record/r
From: |
Pavel Dovgalyuk |
Subject: |
Re: [Qemu-devel] [PATCH v3 5/5] replay: introduce block devices record/replay |
Date: |
Thu, 10 Mar 2016 09:15:36 +0300 |
> From: Kevin Wolf [mailto:address@hidden
> Am 01.03.2016 um 12:08 hat Pavel Dovgalyuk geschrieben:
> > This patch introduces block driver that implement recording
> > and replaying of block devices' operations.
> > All block completion operations are added to the queue.
> > Queue is flushed at checkpoints and information about processed requests
> > is recorded to the log. In replay phase the queue is matched with
> > events read from the log. Therefore block devices requests are processed
> > deterministically.
> >
> > Signed-off-by: Pavel Dovgalyuk <address@hidden>
>
> I like this new version much better than the old one. :-)
Thanks for reviewing!
> > +static int blkreplay_open(BlockDriverState *bs, QDict *options, int flags,
> > + Error **errp)
> > +{
> > + Error *local_err = NULL;
> > + int ret;
> > +
> > + /* Open the image file */
> > + bs->file = bdrv_open_child(NULL, options, "image",
> > + bs, &child_file, false, &local_err);
> > + if (local_err) {
> > + ret = -EINVAL;
> > + error_propagate(errp, local_err);
> > + goto fail;
> > + }
> > +
> > + ret = 0;
> > +fail:
> > + if (ret < 0) {
> > + bdrv_unref_child(bs, bs->file);
>
> This is unnecessary because in error cases, bdrv_open_child() returns
> NULL. On the other hand, bdrv_unref_child() accepts a NULL child and
> just doesn't do anything then, so it's harmless.
Right, but this may be useful in case of future changes (if something else
will be initialized here).
Pavel Dovgalyuk
- [Qemu-devel] [PATCH v3 0/5] Deterministic replay extensions, Pavel Dovgalyuk, 2016/03/01
- [Qemu-devel] [PATCH v3 1/5] replay: character devices, Pavel Dovgalyuk, 2016/03/01
- [Qemu-devel] [PATCH v3 2/5] icount: remove obsolete warp call, Pavel Dovgalyuk, 2016/03/01
- [Qemu-devel] [PATCH v3 3/5] replay: introduce new checkpoint for icount warp, Pavel Dovgalyuk, 2016/03/01
- [Qemu-devel] [PATCH v3 4/5] block: add flush callback, Pavel Dovgalyuk, 2016/03/01
- [Qemu-devel] [PATCH v3 5/5] replay: introduce block devices record/replay, Pavel Dovgalyuk, 2016/03/01
- Re: [Qemu-devel] [PATCH v3 0/5] Deterministic replay extensions, dovgaluk, 2016/03/07