Peter Xu writes:
> mon->fds were protected by BQL. Now protect it by mon_lock so that it
> can even be used in monitor iothread.
>
> Signed-off-by: Peter Xu
Reviewed-by: Markus Armbruster
On Wed, May 09, 2018 at 12:17:32PM +0800, Peter Xu wrote:
> mon->fds were protected by BQL. Now protect it by mon_lock so that it
> can even be used in monitor iothread.
Only monitor_get_fd() can safely be called from the monitor iothread
(oob).
The other functions call close(2), which may block
mon->fds were protected by BQL. Now protect it by mon_lock so that it
can even be used in monitor iothread.
Signed-off-by: Peter Xu
---
monitor.c | 22 ++
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/monitor.c b/monitor.c
index 14c681dc8a..d6c3c08932 100644