[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters
From: |
Pavel Dovgalyuk |
Subject: |
Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters |
Date: |
Mon, 26 Sep 2016 12:51:11 +0300 |
> From: Kevin Wolf [mailto:address@hidden
> Am 26.09.2016 um 10:08 hat Pavel Dovgalyuk geschrieben:
> > This patch disables snapshotting for block driver filters.
> > It is needed, because snapshots should be created
> > in underlying disk images, not in filters itself.
> >
> > Signed-off-by: Pavel Dovgalyuk <address@hidden>
>
> But that's exactly what the existing code implements? If a driver
> doesn't provide .bdrv_snapshot_goto, the request is redirected to
> bs->file.
>
> > block/snapshot.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/block/snapshot.c b/block/snapshot.c
> > index bf5c2ca..8998b8b 100644
> > --- a/block/snapshot.c
> > +++ b/block/snapshot.c
> > @@ -184,6 +184,9 @@ int bdrv_snapshot_goto(BlockDriverState *bs,
> > if (!drv) {
> > return -ENOMEDIUM;
> > }
> > + if (drv->is_filter) {
> > + return 0;
> > + }
>
> This, on the other hand, doesn't redirect the request, but silently
> ignores it. That is, loading the snapshot will apparently succeed, but
> it wouldn't actually load anything and the disk would stay in its
> current state.
In my use case bdrv_all_goto_snapshot iterates all block drivers, including
filters and disk images. Therefore skipping goto for images is ok.
Maybe I should move this check to bdrv_can_snapshot?
>
> > if (drv->bdrv_snapshot_goto) {
> > return drv->bdrv_snapshot_goto(bs, snapshot_id);
> > }
Pavel Dovgalyuk
- [Qemu-devel] [PATCH v5 0/9] replay additions, Pavel Dovgalyuk, 2016/09/26
- [Qemu-devel] [PATCH v5 1/9] replay: move internal data to the structure, Pavel Dovgalyuk, 2016/09/26
- [Qemu-devel] [PATCH v5 3/9] replay: allow replay stopping and restarting, Pavel Dovgalyuk, 2016/09/26
- [Qemu-devel] [PATCH v5 2/9] replay: vmstate for replay module, Pavel Dovgalyuk, 2016/09/26
- [Qemu-devel] [PATCH v5 4/9] record/replay: add network support, Pavel Dovgalyuk, 2016/09/26
- [Qemu-devel] [PATCH v5 5/9] savevm: add public save_vmstate function, Pavel Dovgalyuk, 2016/09/26
- [Qemu-devel] [PATCH v5 6/9] replay: save/load initial state, Pavel Dovgalyuk, 2016/09/26
- [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters, Pavel Dovgalyuk, 2016/09/26
- Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters, Kevin Wolf, 2016/09/26
- Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters,
Pavel Dovgalyuk <=
- Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters, Kevin Wolf, 2016/09/26
- Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters, Pavel Dovgalyuk, 2016/09/27
- Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters, Kevin Wolf, 2016/09/28
- Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters, Pavel Dovgalyuk, 2016/09/28
- Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters, Kevin Wolf, 2016/09/28
- Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters, Pavel Dovgalyuk, 2016/09/28
- Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters, Kevin Wolf, 2016/09/29
[Qemu-devel] [PATCH v5 8/9] block: implement bdrv_recurse_is_first_non_filter for blkreplay, Pavel Dovgalyuk, 2016/09/26
[Qemu-devel] [PATCH v5 9/9] integratorcp: adding vmstate for save/restore, Pavel Dovgalyuk, 2016/09/26
Re: [Qemu-devel] [PATCH v5 0/9] replay additions, Paolo Bonzini, 2016/09/26