qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] f9e8ca: oslib-posix: rename socket_set_nonblo


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] f9e8ca: oslib-posix: rename socket_set_nonblock() to qemu_...
Date: Tue, 02 Apr 2013 13:30:16 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f9e8cacc5557e4372401da74141f833fcacda038
      
https://github.com/qemu/qemu/commit/f9e8cacc5557e4372401da74141f833fcacda038
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-04-02 (Tue, 02 Apr 2013)

  Changed paths:
    M block/nbd.c
    M block/sheepdog.c
    M include/qemu/sockets.h
    M migration.c
    M nbd.c
    M net/socket.c
    M qemu-char.c
    M savevm.c
    M slirp/misc.c
    M slirp/tcp_subr.c
    M ui/vnc.c
    M util/oslib-posix.c
    M util/oslib-win32.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()

The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets.
Rename to qemu_set_nonblock() just like qemu_set_cloexec().

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: fc13fa00eaff6797c67abc9b0f748b346f238986
      
https://github.com/qemu/qemu/commit/fc13fa00eaff6797c67abc9b0f748b346f238986
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-04-02 (Tue, 02 Apr 2013)

  Changed paths:
    M net/socket.c

  Log Message:
  -----------
  net: ensure "socket" backend uses non-blocking fds

There are several code paths in net_init_socket() depending on how the
socket is created: file descriptor passing, UDP multicast, TCP, or UDP.
Some of these support both listen and connect.

Not all code paths set the socket to non-blocking.  This patch addresses
the file descriptor passing and UDP cases which were missing
socket_set_nonblock(fd) calls.

I considered moving socket_set_nonblock(fd) to a central location but it
turns out the code paths are different enough to require non-blocking at
different places.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 1a751ebfbb2d7a696b889d8208cb5ffc83c090b1
      
https://github.com/qemu/qemu/commit/1a751ebfbb2d7a696b889d8208cb5ffc83c090b1
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-04-02 (Tue, 02 Apr 2013)

  Changed paths:
    M util/qemu-sockets.c

  Log Message:
  -----------
  qemu-socket: set passed fd non-blocking in socket_connect()

socket_connect() sets non-blocking on TCP or UNIX domain sockets if a
callback function is passed.  Do the same for file descriptor passing,
otherwise we could unexpectedly be using a blocking file descriptor.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 9b938c7262e403f5467110609cb20ef1ae6e9df2
      
https://github.com/qemu/qemu/commit/9b938c7262e403f5467110609cb20ef1ae6e9df2
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-04-02 (Tue, 02 Apr 2013)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  chardev: clear O_NONBLOCK on SCM_RIGHTS file descriptors

When we receive a file descriptor over a UNIX domain socket the
O_NONBLOCK flag is preserved.  Clear the O_NONBLOCK flag and rely on
QEMU file descriptor users like migration, SPICE, VNC, block layer, and
others to set non-blocking only when necessary.

This change ensures we don't accidentally expose O_NONBLOCK in the QMP
API.  QMP clients should not need to get the non-blocking state
"correct".

A recent real-world example was when libvirt passed a non-blocking TCP
socket for migration where we expected a blocking socket.  The source
QEMU produced a corrupted migration stream since its code did not cope
with non-blocking sockets.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 9d4563c415683e4d06c84a46e8d178a680fdcb7b
      
https://github.com/qemu/qemu/commit/9d4563c415683e4d06c84a46e8d178a680fdcb7b
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-04-02 (Tue, 02 Apr 2013)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: remove unset variables

These variables have not been set for a long time.  Do not
include them in config-host.mak.

Signed-off-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 162cbbd1736de2bca43fdefa7e98c54a361ee60d
      
https://github.com/qemu/qemu/commit/162cbbd1736de2bca43fdefa7e98c54a361ee60d
  Author: Anthony Liguori <address@hidden>
  Date:   2013-04-02 (Tue, 02 Apr 2013)

  Changed paths:
    M block/nbd.c
    M block/sheepdog.c
    M include/qemu/sockets.h
    M migration.c
    M nbd.c
    M net/socket.c
    M qemu-char.c
    M savevm.c
    M slirp/misc.c
    M slirp/tcp_subr.c
    M ui/vnc.c
    M util/oslib-posix.c
    M util/oslib-win32.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  Merge remote-tracking branch 'luiz/queue/qmp' into staging

# By Stefan Hajnoczi
# Via Luiz Capitulino
* luiz/queue/qmp:
  chardev: clear O_NONBLOCK on SCM_RIGHTS file descriptors
  qemu-socket: set passed fd non-blocking in socket_connect()
  net: ensure "socket" backend uses non-blocking fds
  oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()


Compare: https://github.com/qemu/qemu/compare/c707582b78d0...162cbbd1736d

reply via email to

[Prev in Thread] Current Thread [Next in Thread]