Re: [Qemu-devel] [PATCH for-2.10] quorum: Handle bdrv_getlength() failures in quorum_co_flush()

2017-08-07 Thread Alberto Garcia
On Mon 07 Aug 2017 01:29:09 PM CEST, Eric Blake wrote: > On 08/07/2017 03:43 AM, Alberto Garcia wrote: >> On Fri 04 Aug 2017 05:44:00 PM CEST, Eric Blake wrote: --- a/block/quorum.c +++ b/block/quorum.c @@ -785,8 +785,9 @@ static coroutine_fn int

Re: [Qemu-devel] [PATCH for-2.10] quorum: Handle bdrv_getlength() failures in quorum_co_flush()

2017-08-07 Thread Eric Blake
On 08/07/2017 03:43 AM, Alberto Garcia wrote: > On Fri 04 Aug 2017 05:44:00 PM CEST, Eric Blake wrote: >>> --- a/block/quorum.c >>> +++ b/block/quorum.c >>> @@ -785,8 +785,9 @@ static coroutine_fn int >>> quorum_co_flush(BlockDriverState *bs) >>> for (i = 0; i < s->num_children; i++) { >>>

Re: [Qemu-devel] [PATCH for-2.10] quorum: Handle bdrv_getlength() failures in quorum_co_flush()

2017-08-07 Thread Alberto Garcia
On Fri 04 Aug 2017 05:44:00 PM CEST, Eric Blake wrote: >> --- a/block/quorum.c >> +++ b/block/quorum.c >> @@ -785,8 +785,9 @@ static coroutine_fn int quorum_co_flush(BlockDriverState >> *bs) >> for (i = 0; i < s->num_children; i++) { >> result = bdrv_co_flush(s->children[i]->bs); >>

Re: [Qemu-devel] [PATCH for-2.10] quorum: Handle bdrv_getlength() failures in quorum_co_flush()

2017-08-04 Thread Eric Blake
On 08/04/2017 09:08 AM, Alberto Garcia wrote: > A bdrv_getlength() call can fail and return a negative value. This > is not being handled in quorum_co_flush(), which can result in a > QUORUM_REPORT_BAD event with an arbitrary value on the 'sectors-count' > field. > > Reported-by: Markus