summaryrefslogtreecommitdiffstats
path: root/ui/console.c
diff options
context:
space:
mode:
authorPaolo Bonzini2022-04-14 19:57:54 +0200
committerEric Blake2022-04-26 20:16:39 +0200
commitdba5156c0e9c0362b7c6121f9e1c89bb9be1f227 (patch)
tree926943dbe6f7b1248c10b30cc3ae0d77a7a58adf /ui/console.c
parentnbd: code motion and function renaming (diff)
downloadqemu-dba5156c0e9c0362b7c6121f9e1c89bb9be1f227.tar.gz
qemu-dba5156c0e9c0362b7c6121f9e1c89bb9be1f227.tar.xz
qemu-dba5156c0e9c0362b7c6121f9e1c89bb9be1f227.zip
nbd: move s->state under requests_lock
Remove the confusing, and most likely wrong, atomics. The only function that used to be somewhat in a hot path was nbd_client_connected(), but it is not anymore after the previous patches. The same logic is used both to check if a request had to be reissued and also in nbd_reconnecting_attempt(). The former cases are outside requests_lock, while nbd_reconnecting_attempt() does have the lock, therefore the two have been separated in the previous commit. nbd_client_will_reconnect() can simply take s->requests_lock, while nbd_reconnecting_attempt() can inline the access now that no complicated atomics are involved. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220414175756.671165-8-pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org> Reviewed-by: Lukas Straub <lukasstraub2@web.de> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'ui/console.c')
0 files changed, 0 insertions, 0 deletions