aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2022-05-30 12:39:57 +0200
committerVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>2022-06-29 10:57:02 +0300
commit1b8f777673985af366de099ad4e41d334b36fb12 (patch)
treefb72b20d87e4222f2ebea1359916ac9526a724d8
parent8bb100c9e2dc1fe0e33283b0c43252dbaf4eb71b (diff)
downloadqemu-1b8f777673985af366de099ad4e41d334b36fb12.zip
qemu-1b8f777673985af366de099ad4e41d334b36fb12.tar.gz
qemu-1b8f777673985af366de099ad4e41d334b36fb12.tar.bz2
block: use 'unsigned' for in_flight field on driver state
This patch makes in_flight field 'unsigned' for BDRVNBDState and MirrorBlockJob. This matches the definition of this field on BDS and is generically correct - we should never get negative value here. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: John Snow <jsnow@redhat.com> CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> CC: Kevin Wolf <kwolf@redhat.com> CC: Hanna Reitz <hreitz@redhat.com> CC: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
-rw-r--r--block/mirror.c2
-rw-r--r--block/nbd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/block/mirror.c b/block/mirror.c
index d8ecb9e..3c4ab11 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -73,7 +73,7 @@ typedef struct MirrorBlockJob {
uint64_t last_pause_ns;
unsigned long *in_flight_bitmap;
- int in_flight;
+ unsigned in_flight;
int64_t bytes_in_flight;
QTAILQ_HEAD(, MirrorOp) ops_in_flight;
int ret;
diff --git a/block/nbd.c b/block/nbd.c
index 5849d31..97683cc 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -77,7 +77,7 @@ typedef struct BDRVNBDState {
QemuMutex requests_lock;
NBDClientState state;
CoQueue free_sema;
- int in_flight;
+ unsigned in_flight;
NBDClientRequest requests[MAX_NBD_REQUESTS];
QEMUTimer *reconnect_delay_timer;