Files
qemu-ios/util
Stefan Hajnoczi 5cd9c382b7 fdmon-poll: reset npfd when upgrading to fdmon-epoll
npfd keeps track of how many pollfds are currently being monitored. It
must be reset to 0 when fdmon_poll_wait() returns.

When npfd reaches a treshold we switch to fdmon-epoll because it scales
better.

This patch resets npfd in the case where we switch to fdmon-epoll.
Forgetting to do so results in the following assertion failure:

  util/fdmon-poll.c:65: fdmon_poll_wait: Assertion `npfd == 0' failed.

Fixes: 1f050a4690 ("aio-posix: extract ppoll(2) and epoll(7) fd monitoring")
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1869952
Message-Id: <20200915120339.702938-2-stefanha@redhat.com>
2020-09-23 13:45:52 +01:00
..
…
…
…
…
2020-01-06 18:41:32 +04:00
2019-08-16 13:31:52 +02:00
2020-09-23 13:41:58 +01:00
…
…
2019-09-11 08:46:17 +02:00
2020-09-15 14:11:49 +02:00
…
2020-09-17 20:38:42 +02:00
2019-12-17 19:33:52 +01:00
…
2020-09-16 08:41:06 +02:00
…
…
…