Vladimir Sementsov-Ogievskiy
48557b1383
util/hbitmap: strict hbitmap_reset
...
hbitmap_reset has an unobvious property: it rounds requested region up.
It may provoke bugs, like in recently fixed write-blocking mode of
mirror: user calls reset on unaligned region, not keeping in mind that
there are possible unrelated dirty bytes, covered by rounded-up region
and information of this unrelated "dirtiness" will be lost.
Make hbitmap_reset strict: assert that arguments are aligned, allowing
only one exception when @start + @count == hb->orig_size. It's needed
to comfort users of hbitmap_next_dirty_area, which cares about
hb->orig_size.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20190806152611.280389-1-vsementsov@virtuozzo.com>
[Maintainer edit: Max's suggestions from on-list. --js]
[Maintainer edit: Eric's suggestion for aligned macro. --js]
Signed-off-by: John Snow <jsnow@redhat.com>
2019-10-17 17:02:32 -04:00
..
2019-09-20 17:13:41 -04:00
2019-10-05 17:27:43 -04:00
2019-08-19 08:03:41 -07:00
2019-10-04 18:49:19 +02:00
2019-09-05 13:18:52 +02:00
2019-09-19 12:01:48 +02:00
2019-07-30 12:25:43 +02:00
2019-09-28 17:17:48 +02:00
2019-10-14 17:12:48 +02:00
2019-09-30 11:02:22 +01:00
2019-10-07 15:14:15 +02:00
2019-09-10 14:14:32 +01:00
2019-06-12 13:18:33 +02:00
2019-09-05 13:18:52 +02:00
2019-10-05 17:27:43 -04:00
2019-10-05 17:25:55 -04:00
2019-09-07 08:32:34 +02:00
2019-10-01 11:54:17 +02:00
2019-09-03 14:56:06 +02:00
2019-08-21 10:27:13 +02:00
2019-09-05 13:18:52 +02:00
2019-06-12 13:20:21 +02:00
2019-06-12 13:20:21 +02:00
2019-09-05 13:18:52 +02:00
2019-08-15 19:23:59 +02:00
2019-06-12 13:18:33 +02:00
2019-09-05 13:18:52 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-06-12 13:20:20 +02:00
2019-09-05 13:18:52 +02:00
2019-10-14 09:48:01 +01:00
2019-09-20 14:08:10 -05:00
2019-09-05 13:18:52 +02:00
2019-06-12 13:18:33 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-09-19 12:01:48 +02:00
2019-09-12 11:19:48 +01:00
2019-09-05 13:18:52 +02:00
2019-07-02 14:17:15 +02:00
2019-10-01 11:42:27 +02:00
2019-08-15 19:23:59 +02:00
2019-10-03 12:48:42 +02:00
2019-09-02 10:52:22 +01:00
2019-06-12 13:18:33 +02:00
2019-08-15 19:23:59 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00
2019-07-02 02:34:55 +02:00
2019-08-29 09:45:53 +10:00
2019-08-20 17:26:21 +02:00
2019-10-15 18:09:02 +01:00
2019-08-15 19:23:59 +02:00
2019-09-05 13:18:52 +02:00
2019-09-20 17:13:41 -04:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-06-12 13:18:33 +02:00
2019-08-22 17:30:25 +04:00
2019-08-22 17:30:25 +04:00
2019-06-12 13:18:33 +02:00
2019-09-05 13:18:52 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00
2019-09-10 08:58:43 +02:00
2019-08-16 13:31:52 +02:00
2019-08-20 20:00:51 +02:00
2019-08-16 13:31:52 +02:00
2019-09-10 08:58:43 +02:00
2019-09-10 08:58:43 +02:00
2019-09-10 08:58:43 +02:00
2019-10-04 18:49:18 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:20:20 +02:00
2019-06-12 13:20:20 +02:00
2019-10-17 17:02:32 -04:00
2019-08-16 13:31:52 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00
2019-09-03 23:24:42 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00
2019-09-05 13:18:52 +02:00
2019-08-16 13:31:53 +02:00
2019-09-28 16:51:30 +02:00
2019-09-24 14:07:22 +02:00
2019-08-16 13:31:52 +02:00
2019-08-20 17:26:19 +02:00
2019-08-20 17:26:19 +02:00
2019-09-11 10:29:27 +01:00
2019-09-03 23:24:42 +02:00
2019-10-11 17:52:31 +01:00
2019-09-05 13:18:52 +02:00
2019-07-05 17:08:03 -03:00
2019-09-05 13:18:52 +02:00
2019-06-12 13:18:33 +02:00
2019-09-05 13:18:52 +02:00
2019-09-03 23:24:42 +02:00
2019-09-05 13:18:52 +02:00
2019-06-12 13:18:33 +02:00
2019-09-05 13:18:52 +02:00
2019-10-01 11:42:27 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-07-04 17:00:32 -04:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-08-15 19:24:10 +02:00
2019-09-05 13:18:52 +02:00
2019-09-05 13:18:52 +02:00
2019-06-12 13:18:33 +02:00
2019-06-12 13:18:33 +02:00