Re: [PATCH] block/snapshot: Clarify goto fallback behavior

2021-06-04 Thread Max Reitz
On 03.06.21 18:02, Peter Maydell wrote: On Mon, 3 May 2021 at 10:55, Max Reitz wrote: In the bdrv_snapshot_goto() fallback code, we work with a pointer to either bs->file or bs->backing. We close that child, close the node (with .bdrv_close()), apply the snapshot on the child node, and then

Re: [PATCH] block/snapshot: Clarify goto fallback behavior

2021-06-03 Thread Peter Maydell
On Mon, 3 May 2021 at 10:55, Max Reitz wrote: > > In the bdrv_snapshot_goto() fallback code, we work with a pointer to > either bs->file or bs->backing. We close that child, close the node > (with .bdrv_close()), apply the snapshot on the child node, and then > re-open the node (with

Re: [PATCH] block/snapshot: Clarify goto fallback behavior

2021-05-06 Thread Vladimir Sementsov-Ogievskiy
05.05.2021 23:37, Vladimir Sementsov-Ogievskiy wrote: 05.05.2021 19:25, Max Reitz wrote: On 05.05.21 17:05, Vladimir Sementsov-Ogievskiy wrote: 03.05.2021 12:54, Max Reitz wrote: In the bdrv_snapshot_goto() fallback code, we work with a pointer to either bs->file or bs->backing. We close

Re: [PATCH] block/snapshot: Clarify goto fallback behavior

2021-05-05 Thread Vladimir Sementsov-Ogievskiy
05.05.2021 19:25, Max Reitz wrote: On 05.05.21 17:05, Vladimir Sementsov-Ogievskiy wrote: 03.05.2021 12:54, Max Reitz wrote: In the bdrv_snapshot_goto() fallback code, we work with a pointer to either bs->file or bs->backing. We close that child, Do we? We *detach it. close the node

Re: [PATCH] block/snapshot: Clarify goto fallback behavior

2021-05-05 Thread Max Reitz
On 05.05.21 17:05, Vladimir Sementsov-Ogievskiy wrote: 03.05.2021 12:54, Max Reitz wrote: In the bdrv_snapshot_goto() fallback code, we work with a pointer to either bs->file or bs->backing. We close that child, Do we? We *detach it. close the node (with .bdrv_close()), apply the

Re: [PATCH] block/snapshot: Clarify goto fallback behavior

2021-05-05 Thread Vladimir Sementsov-Ogievskiy
03.05.2021 12:54, Max Reitz wrote: In the bdrv_snapshot_goto() fallback code, we work with a pointer to either bs->file or bs->backing. We close that child, Do we? close the node (with .bdrv_close()), apply the snapshot on the child node, and then re-open the node (with .bdrv_open()).

[PATCH] block/snapshot: Clarify goto fallback behavior

2021-05-03 Thread Max Reitz
In the bdrv_snapshot_goto() fallback code, we work with a pointer to either bs->file or bs->backing. We close that child, close the node (with .bdrv_close()), apply the snapshot on the child node, and then re-open the node (with .bdrv_open()). In order for .bdrv_open() to attach the same child