Re: [Qemu-devel] [PATCH for-2.11 3/5] block: Guard against NULL bs->drv

2017-11-14 Thread Max Reitz
On 2017-11-10 22:46, Eric Blake wrote: > On 11/10/2017 02:31 PM, Max Reitz wrote: >> We currently do not guard everywhere against a NULL bs->drv where we >> should be doing so. Most of the places fixed here just do not care >> about that case at all. >> >> Some care implicitly, e.g. through a prio

Re: [Qemu-devel] [PATCH for-2.11 3/5] block: Guard against NULL bs->drv

2017-11-10 Thread Eric Blake
On 11/10/2017 02:31 PM, Max Reitz wrote: > We currently do not guard everywhere against a NULL bs->drv where we > should be doing so. Most of the places fixed here just do not care > about that case at all. > > Some care implicitly, e.g. through a prior function call to > bdrv_getlength() which w

[Qemu-devel] [PATCH for-2.11 3/5] block: Guard against NULL bs->drv

2017-11-10 Thread Max Reitz
We currently do not guard everywhere against a NULL bs->drv where we should be doing so. Most of the places fixed here just do not care about that case at all. Some care implicitly, e.g. through a prior function call to bdrv_getlength() which would always fail for an ejected BDS. Add an assert t