aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/037
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2013-12-05 16:38:33 +0100
committerKevin Wolf <kwolf@redhat.com>2014-01-22 12:07:16 +0100
commite04fb07fd1676e9facd7f3f878c1bbe03bccd26b (patch)
treee1b2da9e26610cbd77f4e846c9846797bebcf020 /tests/qemu-iotests/037
parent732c66ce641c69702a7e7fdb73b68f0c1b583ab5 (diff)
rbd: switch from pipe to QEMUBH completion notification
rbd callbacks are called from non-QEMU threads. Up until now a pipe was used to signal completion back to the QEMU iothread. The pipe writer code handles EAGAIN using select(2). The select(2) API is not scalable since fd_set size is static. FD_SET() can write beyond the end of fd_set if the file descriptor number is too high. (QEMU's main loop uses poll(2) to avoid this issue with select(2).) Since the pipe itself is quite clumsy to use and QEMUBH is now thread-safe, just schedule a BH from the rbd callback function. This way we can simplify I/O completion in addition to eliminating the potential FD_SET() crash when file descriptor numbers become too high. Crash scenario: QEMU already has 1024 file descriptors open. Hotplug an rbd drive and get the pipe writer to take the select(2) code path. Reviewed-by: Josh Durgin <josh.durgin@inktank.com> Tested-by: Josh Durgin <josh.durgin@inktank.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/037')
0 files changed, 0 insertions, 0 deletions