Re: [Qemu-devel] [PATCH for-4.0 1/3] block: continue until base is found in bdrv_freeze_backing_chain() et al

2019-03-28 Thread Alberto Garcia
On Thu 28 Mar 2019 11:33:55 AM CET, Vladimir Sementsov-Ogievskiy wrote: >>> All three functions that handle the BdrvChild.frozen attribute walk >>> the backing chain from 'bs' to 'base' and stop either when 'base' is >>> found or at the end of the chain if 'base' is NULL. >>> >>> However if 'base'

Re: [Qemu-devel] [PATCH for-4.0 1/3] block: continue until base is found in bdrv_freeze_backing_chain() et al

2019-03-28 Thread Vladimir Sementsov-Ogievskiy
28.03.2019 13:27, Vladimir Sementsov-Ogievskiy wrote: > 26.03.2019 20:07, Alberto Garcia wrote: >> All three functions that handle the BdrvChild.frozen attribute walk >> the backing chain from 'bs' to 'base' and stop either when 'base' is >> found or at the end of the chain if 'base' is NULL. >>

Re: [Qemu-devel] [PATCH for-4.0 1/3] block: continue until base is found in bdrv_freeze_backing_chain() et al

2019-03-28 Thread Vladimir Sementsov-Ogievskiy
26.03.2019 20:07, Alberto Garcia wrote: > All three functions that handle the BdrvChild.frozen attribute walk > the backing chain from 'bs' to 'base' and stop either when 'base' is > found or at the end of the chain if 'base' is NULL. > > However if 'base' is not found then the functions return

Re: [Qemu-devel] [PATCH for-4.0 1/3] block: continue until base is found in bdrv_freeze_backing_chain() et al

2019-03-28 Thread Vladimir Sementsov-Ogievskiy
28.03.2019 13:04, Alberto Garcia wrote: > On Thu 28 Mar 2019 10:45:51 AM CET, Vladimir Sementsov-Ogievskiy wrote: >>> -for (i = bs; i != base && i->backing; i = backing_bs(i)) { >>> -if (i->backing->frozen) { >>> +for (i = bs; i != base; i = backing_bs(i)) { >>> +if

Re: [Qemu-devel] [PATCH for-4.0 1/3] block: continue until base is found in bdrv_freeze_backing_chain() et al

2019-03-28 Thread Alberto Garcia
On Thu 28 Mar 2019 10:45:51 AM CET, Vladimir Sementsov-Ogievskiy wrote: >> -for (i = bs; i != base && i->backing; i = backing_bs(i)) { >> -if (i->backing->frozen) { >> +for (i = bs; i != base; i = backing_bs(i)) { >> +if (i->backing && i->backing->frozen) { > > may be a bit

Re: [Qemu-devel] [PATCH for-4.0 1/3] block: continue until base is found in bdrv_freeze_backing_chain() et al

2019-03-28 Thread Vladimir Sementsov-Ogievskiy
26.03.2019 20:07, Alberto Garcia wrote: > All three functions that handle the BdrvChild.frozen attribute walk > the backing chain from 'bs' to 'base' and stop either when 'base' is > found or at the end of the chain if 'base' is NULL. > > However if 'base' is not found then the functions return

[Qemu-devel] [PATCH for-4.0 1/3] block: continue until base is found in bdrv_freeze_backing_chain() et al

2019-03-26 Thread Alberto Garcia
All three functions that handle the BdrvChild.frozen attribute walk the backing chain from 'bs' to 'base' and stop either when 'base' is found or at the end of the chain if 'base' is NULL. However if 'base' is not found then the functions return without errors as if it was NULL. This is wrong: