vhost: Fix address calculation in vhost_dev_sync_region()
We still need advance address even we find there's no dirty pages in current chunk. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
3d002df33e
commit
0c600ce2a7
|
@ -37,6 +37,7 @@ static void vhost_dev_sync_region(struct vhost_dev *dev,
|
||||||
/* We first check with non-atomic: much cheaper,
|
/* We first check with non-atomic: much cheaper,
|
||||||
* and we expect non-dirty to be the common case. */
|
* and we expect non-dirty to be the common case. */
|
||||||
if (!*from) {
|
if (!*from) {
|
||||||
|
addr += VHOST_LOG_CHUNK;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Data must be read atomically. We don't really
|
/* Data must be read atomically. We don't really
|
||||||
|
|
Loading…
Reference in a new issue