[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 76d570: dirty-bitmap: improve bdrv_dirty_bitm
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 76d570: dirty-bitmap: improve bdrv_dirty_bitmap_next_zero |
Date: |
Thu, 17 Jan 2019 06:08:13 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 76d570dc495c56bbdcc4574bfc6d512dcb8e9aa9
https://github.com/qemu/qemu/commit/76d570dc495c56bbdcc4574bfc6d512dcb8e9aa9
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-01-15 (Tue, 15 Jan 2019)
Changed paths:
M block/backup.c
M block/dirty-bitmap.c
M include/block/dirty-bitmap.h
M include/qemu/hbitmap.h
M nbd/server.c
M tests/test-hbitmap.c
M util/hbitmap.c
Log Message:
-----------
dirty-bitmap: improve bdrv_dirty_bitmap_next_zero
Add bytes parameter to the function, to limit searched range.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Commit: fa9c2da29404be9baeb7b8f88fed3cb232688cd9
https://github.com/qemu/qemu/commit/fa9c2da29404be9baeb7b8f88fed3cb232688cd9
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-01-15 (Tue, 15 Jan 2019)
Changed paths:
M tests/test-hbitmap.c
Log Message:
-----------
tests: add tests for hbitmap_next_zero with specified end parameter
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Commit: a78a1a48cd1a2e86f23f113bb05e2d3dd8ae0bf6
https://github.com/qemu/qemu/commit/a78a1a48cd1a2e86f23f113bb05e2d3dd8ae0bf6
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-01-15 (Tue, 15 Jan 2019)
Changed paths:
M block/dirty-bitmap.c
M include/block/dirty-bitmap.h
M include/qemu/hbitmap.h
M util/hbitmap.c
Log Message:
-----------
dirty-bitmap: add bdrv_dirty_bitmap_next_dirty_area
The function alters bdrv_dirty_iter_next_area(), which is wrong and
less efficient (see further commit
"block/mirror: fix and improve do_sync_target_write" for description).
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Commit: bb6a0ec10ee3f791835f1479a8a3226f64cb6d75
https://github.com/qemu/qemu/commit/bb6a0ec10ee3f791835f1479a8a3226f64cb6d75
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-01-15 (Tue, 15 Jan 2019)
Changed paths:
M tests/test-hbitmap.c
Log Message:
-----------
tests: add tests for hbitmap_next_dirty_area
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Commit: 1eaf1b0fdf41069b4b3e67eae88da0d781261792
https://github.com/qemu/qemu/commit/1eaf1b0fdf41069b4b3e67eae88da0d781261792
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-01-15 (Tue, 15 Jan 2019)
Changed paths:
M block/mirror.c
Log Message:
-----------
block/mirror: fix and improve do_sync_target_write
Use bdrv_dirty_bitmap_next_dirty_area() instead of
bdrv_dirty_iter_next_area(), because of the following problems of
bdrv_dirty_iter_next_area():
1. Using HBitmap iterators we should carefully handle unaligned offset,
as first call to hbitmap_iter_next() may return a value less than
original offset (actually, it will be original offset rounded down to
bitmap granularity). This handling is not done in
do_sync_target_write().
2. bdrv_dirty_iter_next_area() handles unaligned max_offset
incorrectly:
look at the code:
if (max_offset == iter->bitmap->size) {
/* If max_offset points to the image end, round it up by the
* bitmap granularity */
gran_max_offset = ROUND_UP(max_offset, granularity);
} else {
gran_max_offset = max_offset;
}
ret = hbitmap_iter_next(&iter->hbi, false);
if (ret < 0 || ret + granularity > gran_max_offset) {
return false;
}
and assume that max_offset != iter->bitmap->size but still unaligned.
if 0 < ret < max_offset we found dirty area, but the function can
return false in this case (if ret + granularity > max_offset).
3. bdrv_dirty_iter_next_area() uses inefficient loop to find the end of
the dirty area. Let's use more efficient hbitmap_next_zero instead
(bdrv_dirty_bitmap_next_dirty_area() do so)
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Commit: 166cd551254f4ea6226d7e687b19928747247500
https://github.com/qemu/qemu/commit/166cd551254f4ea6226d7e687b19928747247500
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-01-15 (Tue, 15 Jan 2019)
Changed paths:
M block/dirty-bitmap.c
M include/block/dirty-bitmap.h
Log Message:
-----------
Revert "block/dirty-bitmap: Add bdrv_dirty_iter_next_area"
This reverts commit 72d10a94213a954ad569095cb4491f2ae0853c40.
The function is unused now.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: John Snow <address@hidden>
Commit: 4294c4ab4825a2ce4d816e52f95a6f08b56aa69c
https://github.com/qemu/qemu/commit/4294c4ab4825a2ce4d816e52f95a6f08b56aa69c
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-01-15 (Tue, 15 Jan 2019)
Changed paths:
M tests/test-hbitmap.c
Log Message:
-----------
Revert "test-hbitmap: Add non-advancing iter_next tests"
This reverts commit 269576848ec3d57d2d958cf5ac69b08c44adf816.
The functionality is unused. Drop tests.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: John Snow <address@hidden>
Commit: 19c021e1948a81c4ba19b3ff735432b45b6aebee
https://github.com/qemu/qemu/commit/19c021e1948a81c4ba19b3ff735432b45b6aebee
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-01-15 (Tue, 15 Jan 2019)
Changed paths:
M block/backup.c
M block/dirty-bitmap.c
M include/qemu/hbitmap.h
M tests/test-hbitmap.c
M util/hbitmap.c
Log Message:
-----------
Revert "hbitmap: Add @advance param to hbitmap_iter_next()"
This reverts commit a33fbb4f8b64226becf502a123733776ce319b24.
The functionality is unused.
Note: in addition to automatic revert, drop second parameter in
hbitmap_iter_next() call from hbitmap_next_dirty_area() too.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: John Snow <address@hidden>
Commit: 681d61362d3f766a00806b89d6581869041f73cb
https://github.com/qemu/qemu/commit/681d61362d3f766a00806b89d6581869041f73cb
Author: Peter Maydell <address@hidden>
Date: 2019-01-17 (Thu, 17 Jan 2019)
Changed paths:
M block/backup.c
M block/dirty-bitmap.c
M block/mirror.c
M include/block/dirty-bitmap.h
M include/qemu/hbitmap.h
M nbd/server.c
M tests/test-hbitmap.c
M util/hbitmap.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into
staging
Pull request
# gpg: Signature made Wed 16 Jan 2019 01:00:25 GMT
# gpg: using RSA key 7DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <address@hidden>"
# Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB
# Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E
* remotes/jnsnow/tags/bitmaps-pull-request:
Revert "hbitmap: Add @advance param to hbitmap_iter_next()"
Revert "test-hbitmap: Add non-advancing iter_next tests"
Revert "block/dirty-bitmap: Add bdrv_dirty_iter_next_area"
block/mirror: fix and improve do_sync_target_write
tests: add tests for hbitmap_next_dirty_area
dirty-bitmap: add bdrv_dirty_bitmap_next_dirty_area
tests: add tests for hbitmap_next_zero with specified end parameter
dirty-bitmap: improve bdrv_dirty_bitmap_next_zero
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/6f2f34177a25...681d61362d3f
**NOTE:** This service has been marked for deprecation:
https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 76d570: dirty-bitmap: improve bdrv_dirty_bitmap_next_zero,
GitHub <=