Skip to contentSkip to conversation

libvhost-user: fix bad vu_log_write

PATCH In review Li Feng 2 participants 2 messages Apr 20, 2019 – Apr 21, 2019

lore
Share & tools
lore

Li Feng

author
#0 lore raw

PATCH 1/1 libvhost-user: fix bad vu_log_write

Mark dirty as page, the step of each call is 1.

---
 contrib/libvhost-user/libvhost-user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/libvhost-user/libvhost-user.c +1 -1
index e08d6c7b97..2689de6d1c 100644
@@ -433,7 +433,7 @@ vu_log_write(VuDev *dev, uint64_t address, uint64_t length)
     page = address / VHOST_LOG_PAGE;
     while (page * VHOST_LOG_PAGE < address + length) {
         vu_log_page(dev->log_table, page);
-        page += VHOST_LOG_PAGE;
+        page += 1;
     }
 
     vu_log_kick(dev);
Signature · 1 line
2.11.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Li Feng

Mark dirty as page, the step of each call is 1.

Quoted 21 lines
---
 contrib/libvhost-user/libvhost-user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/libvhost-user/libvhost-user.c +1 -2
index e08d6c7b97..2689de6d1c 100644
@@ -433,7 +433,7 @@ vu_log_write(VuDev *dev, uint64_t address, uint64_t length)
     page = address / VHOST_LOG_PAGE;
     while (page * VHOST_LOG_PAGE < address + length) {
         vu_log_page(dev->log_table, page);
-        page += VHOST_LOG_PAGE;
+        page += 1;
     }
 
     vu_log_kick(dev);
--

2.11.0

Signature · 1 line
Marc-André Lureau