diff options
author | Peter Xu <peterx@redhat.com> | 2018-06-08 11:55:11 +0800 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-06-18 15:48:22 +0200 |
commit | 474514668b47c9d2148b526e379ffbb6764d9a9e (patch) | |
tree | 093a62a7cd6cf125fb9987e17574c58524df3aa8 /nbd | |
parent | d32749deb61513c5456901f20e19887e1bc3d7f3 (diff) |
monitor: add lock to protect mon_fdsets
Introduce a new global big lock for mon_fdsets. Take it where needed.
The monitor_fdset_get_fd() handling is a bit tricky: now we need to call
qemu_mutex_unlock() which might pollute errno, so we need to make sure
the correct errno be passed up to the callers. To make things simpler,
we let monitor_fdset_get_fd() return the -errno directly when error
happens, then in qemu_open() we move it back into errno.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180608035511.7439-8-peterx@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'nbd')
0 files changed, 0 insertions, 0 deletions