Re: [Qemu-devel] [PATCH v2 1/3] dmg: fix binary search

2019-01-03 Thread Yu-Chen Lin
Stefan Hajnoczi 於 2019年1月3日 週四 下午6:09寫道: > On Wed, Jan 02, 2019 at 08:20:54PM +0800, 林育辰 wrote: > > This series is focus on fixing bug #1809304 (see: > > https://bugs.launchpad.net/qemu/+bug/1809304). > > There is an example dmg file in #1809304 which will trigger this bug. > > Thanks. It would

Re: [Qemu-devel] [PATCH v2 1/3] dmg: fix binary search

2019-01-03 Thread Stefan Hajnoczi
On Wed, Jan 02, 2019 at 08:20:54PM +0800, 林育辰 wrote: > This series is focus on fixing bug #1809304 (see: > https://bugs.launchpad.net/qemu/+bug/1809304). > There is an example dmg file in #1809304 which will trigger this bug. Thanks. It would be great to include a tiny dmg file in tests/qemu-iote

Re: [Qemu-devel] [PATCH v2 1/3] dmg: fix binary search

2019-01-02 Thread 林育辰
Hi, Stefan Thank you for your reviewing. This series is focus on fixing bug #1809304 (see: https://bugs.launchpad.net/qemu/+bug/1809304). There is an example dmg file in #1809304 which will trigger this bug. About your case, I think we can simply check whether chunk3 is zero before we decrease i

Re: [Qemu-devel] [PATCH v2 1/3] dmg: fix binary search

2019-01-02 Thread Stefan Hajnoczi
On Sun, Dec 23, 2018 at 10:59:37AM +0800, yuchenlin wrote: > There is a possible hang in original binary search implementation. That is > if chunk1 = 4, chunk2 = 5, chunk3 = 4, and we go else case. > > The chunk1 will be still 4, and so on. > > Signed-off-by: yuchenlin > --- > block/dmg.c | 6 +

Re: [Qemu-devel] [PATCH v2 1/3] dmg: fix binary search

2018-12-24 Thread Julio Faracco
Looks good to me. Reviewed-by: Julio Faracco Em dom, 23 de dez de 2018 às 01:04, yuchenlin escreveu: > There is a possible hang in original binary search implementation. That is > if chunk1 = 4, chunk2 = 5, chunk3 = 4, and we go else case. > > The chunk1 will be still 4, and so on. > > Signed-

[Qemu-devel] [PATCH v2 1/3] dmg: fix binary search

2018-12-22 Thread yuchenlin
There is a possible hang in original binary search implementation. That is if chunk1 = 4, chunk2 = 5, chunk3 = 4, and we go else case. The chunk1 will be still 4, and so on. Signed-off-by: yuchenlin --- block/dmg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/