Skip to contentSkip to conversation

NBD changes for 2014-06-30

GIT PULL Applied Paolo Bonzini 2 participants 3 messages Jun 30, 2014

lore
Share & tools
lore
#0 lore raw

The following changes since commit d4cba13bdf251baeedb36b87c1e9f6766773e380:

tcg/ppc: Fix failure in tcg_out_mem_long (2014-06-27 13:23:41 +0100)

are available in the git repository at:

git://github.com/bonzini/qemu.git nbd-next

for you to fetch changes up to 32d7d2e068756874518f97d5a114e43d8977980b:

nbd: Handle NBD_OPT_LIST option. (2014-06-30 12:50:17 +0200)

Fixed for Win32 compatibility.

----------------------------------------------------------------
Hani Benhabiles (5):
nbd: Don't export a block device with no medium.
nbd: Don't validate from and len in NBD_CMD_DISC.
nbd: Shutdown socket before closing.
nbd: Handle fixed new-style clients.
nbd: Handle NBD_OPT_LIST option.

 blockdev-nbd.c      |   5 ++
 include/block/nbd.h |  12 +++
 nbd.c               | 217 ++++++++++++++++++++++++++++++++++++++++------------
 qemu-nbd.c          |   1 +
 4 files changed, 186 insertions(+), 49 deletions(-)
Signature · 1 line
1.9.3
#1 lore raw

[Qemu-devel] [PULL v2 3/5] nbd: Shutdown socket before closing.

From: Hani Benhabiles <[email protected]>

This forces finishing data sending to client before closing the socket like in exports listing or replying with NBD_REP_ERR_UNSUP cases.

---
 blockdev-nbd.c | 1 +
 qemu-nbd.c     | 1 +
 2 files changed, 2 insertions(+)
blockdev-nbd.c +1 -0
index 18dc528..b3a2474 100644
@@ -28,6 +28,7 @@ static void nbd_accept(void *opaque)
 
     int fd = accept(server_fd, (struct sockaddr *)&addr, &addr_len);
     if (fd >= 0 && !nbd_client_new(NULL, fd, nbd_client_put)) {
+        shutdown(fd, 2);
         close(fd);
     }
 }
qemu-nbd.c +1 -0
index ba60436..626e584 100644
@@ -372,6 +372,7 @@ static void nbd_accept(void *opaque)
     if (nbd_client_new(exp, fd, nbd_client_closed)) {
         nb_fds++;
     } else {
+        shutdown(fd, 2);
         close(fd);
     }
 }
Signature · 1 line
1.9.3
#2 lore raw
In reply to Paolo Bonzini
Quoted 6 lines · Paolo Bonzini

The following changes since commit d4cba13bdf251baeedb36b87c1e9f6766773e380:

tcg/ppc: Fix failure in tcg_out_mem_long (2014-06-27 13:23:41 +0100)

are available in the git repository at:

Quoted 7 lines

git://github.com/bonzini/qemu.git nbd-next

for you to fetch changes up to 32d7d2e068756874518f97d5a114e43d8977980b:

nbd: Handle NBD_OPT_LIST option. (2014-06-30 12:50:17 +0200)

Fixed for Win32 compatibility.

Applied, thanks.

-- PMM