Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-06 Thread Vladimir Sementsov-Ogievskiy
06.08.2019 16:30, John Snow wrote: > > > On 8/6/19 8:39 AM, Vladimir Sementsov-Ogievskiy wrote: >> 03.08.2019 0:19, Max Reitz wrote: >>> On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: hbitmap_reset is broken: it rounds up the requested region. It leads to the following bug, whic

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-06 Thread John Snow
On 8/6/19 8:39 AM, Vladimir Sementsov-Ogievskiy wrote: > 03.08.2019 0:19, Max Reitz wrote: >> On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >>> hbitmap_reset is broken: it rounds up the requested region. It leads to >>> the following bug, which is shown by fixed test: >>> >>> assume gra

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-06 Thread Vladimir Sementsov-Ogievskiy
03.08.2019 0:19, Max Reitz wrote: > On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >> hbitmap_reset is broken: it rounds up the requested region. It leads to >> the following bug, which is shown by fixed test: >> >> assume granularity = 2 >> set(0, 3) # count becomes 4 >> reset(0, 1) # coun

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Paolo Bonzini
On 02/08/19 23:19, Max Reitz wrote: > > But I don’t know whether this patch is the best way forward still. I > think call hbitmap_reset() with unaligned boundaries generally calls for > trouble, as John has laid out. If mirror’s do_sync_target_write() is > the only offender right now, I’d prefer

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread John Snow
On 8/5/19 5:48 AM, Vladimir Sementsov-Ogievskiy wrote: > 05.08.2019 12:26, Vladimir Sementsov-Ogievskiy wrote: >> 02.08.2019 22:21, John Snow wrote: >>> >>> >>> On 8/2/19 2:58 PM, Vladimir Sementsov-Ogievskiy wrote: hbitmap_reset is broken: it rounds up the requested region. It leads to >>>

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Max Reitz
On 05.08.19 11:45, Vladimir Sementsov-Ogievskiy wrote: > 03.08.2019 0:19, Max Reitz wrote: >> On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >>> hbitmap_reset is broken: it rounds up the requested region. It leads to >>> the following bug, which is shown by fixed test: >>> >>> assume granul

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
05.08.2019 14:32, Max Reitz wrote: > On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >> hbitmap_reset is broken: it rounds up the requested region. It leads to >> the following bug, which is shown by fixed test: >> >> assume granularity = 2 >> set(0, 3) # count becomes 4 >> reset(0, 1) # cou

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Max Reitz
On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: > hbitmap_reset is broken: it rounds up the requested region. It leads to > the following bug, which is shown by fixed test: > > assume granularity = 2 > set(0, 3) # count becomes 4 > reset(0, 1) # count becomes 2 > > But user of the interfac

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Max Reitz
On 05.08.19 11:56, Kevin Wolf wrote: > Am 02.08.2019 um 23:19 hat Max Reitz geschrieben: >> On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >>> hbitmap_reset is broken: it rounds up the requested region. It leads to >>> the following bug, which is shown by fixed test: >>> >>> assume granular

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Max Reitz
On 05.08.19 11:45, Vladimir Sementsov-Ogievskiy wrote: > 03.08.2019 0:19, Max Reitz wrote: >> On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >>> hbitmap_reset is broken: it rounds up the requested region. It leads to >>> the following bug, which is shown by fixed test: >>> >>> assume granul

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Kevin Wolf
Am 02.08.2019 um 23:19 hat Max Reitz geschrieben: > On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: > > hbitmap_reset is broken: it rounds up the requested region. It leads to > > the following bug, which is shown by fixed test: > > > > assume granularity = 2 > > set(0, 3) # count becomes 4

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
05.08.2019 12:26, Vladimir Sementsov-Ogievskiy wrote: > 02.08.2019 22:21, John Snow wrote: >> >> >> On 8/2/19 2:58 PM, Vladimir Sementsov-Ogievskiy wrote: >>> hbitmap_reset is broken: it rounds up the requested region. It leads to >>> the following bug, which is shown by fixed test: >>> >>> assume

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
03.08.2019 0:19, Max Reitz wrote: > On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: >> hbitmap_reset is broken: it rounds up the requested region. It leads to >> the following bug, which is shown by fixed test: >> >> assume granularity = 2 >> set(0, 3) # count becomes 4 >> reset(0, 1) # coun

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-05 Thread Vladimir Sementsov-Ogievskiy
02.08.2019 22:21, John Snow wrote: > > > On 8/2/19 2:58 PM, Vladimir Sementsov-Ogievskiy wrote: >> hbitmap_reset is broken: it rounds up the requested region. It leads to >> the following bug, which is shown by fixed test: >> >> assume granularity = 2 >> set(0, 3) # count becomes 4 >> reset(0, 1)

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-02 Thread Max Reitz
On 02.08.19 20:58, Vladimir Sementsov-Ogievskiy wrote: > hbitmap_reset is broken: it rounds up the requested region. It leads to > the following bug, which is shown by fixed test: > > assume granularity = 2 > set(0, 3) # count becomes 4 > reset(0, 1) # count becomes 2 > > But user of the interfac

Re: [Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-02 Thread John Snow
On 8/2/19 2:58 PM, Vladimir Sementsov-Ogievskiy wrote: > hbitmap_reset is broken: it rounds up the requested region. It leads to > the following bug, which is shown by fixed test: > > assume granularity = 2 > set(0, 3) # count becomes 4 > reset(0, 1) # count becomes 2 > > But user of the inter

[Qemu-devel] [PATCH] util/hbitmap: fix unaligned reset

2019-08-02 Thread Vladimir Sementsov-Ogievskiy
hbitmap_reset is broken: it rounds up the requested region. It leads to the following bug, which is shown by fixed test: assume granularity = 2 set(0, 3) # count becomes 4 reset(0, 1) # count becomes 2 But user of the interface assume that virtual bit 1 should be still dirty, so hbitmap should re