1. 22 1月, 2014 1 次提交
    • S
      rbd: switch from pipe to QEMUBH completion notification · e04fb07f
      Stefan Hajnoczi 提交于
      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: NJosh Durgin <josh.durgin@inktank.com>
      Tested-by: NJosh Durgin <josh.durgin@inktank.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e04fb07f
  2. 17 1月, 2014 2 次提交
  3. 15 1月, 2014 2 次提交
  4. 14 1月, 2014 4 次提交
  5. 13 1月, 2014 31 次提交