* [Qemu-devel] [PULL v2 0/5] NBD changes for 2014-06-30
@ 2014-06-30 12:59 Paolo Bonzini
2014-06-30 12:59 ` [Qemu-devel] [PULL v2 3/5] nbd: Shutdown socket before closing Paolo Bonzini
2014-06-30 15:28 ` [Qemu-devel] [PULL v2 0/5] NBD changes for 2014-06-30 Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2014-06-30 12:59 UTC (permalink / raw)
To: qemu-devel
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(-)
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PULL v2 3/5] nbd: Shutdown socket before closing.
2014-06-30 12:59 [Qemu-devel] [PULL v2 0/5] NBD changes for 2014-06-30 Paolo Bonzini
@ 2014-06-30 12:59 ` Paolo Bonzini
2014-06-30 15:28 ` [Qemu-devel] [PULL v2 0/5] NBD changes for 2014-06-30 Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2014-06-30 12:59 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Hani Benhabiles
From: Hani Benhabiles <kroosec@gmail.com>
This forces finishing data sending to client before closing the socket like in
exports listing or replying with NBD_REP_ERR_UNSUP cases.
Signed-off-by: Hani Benhabiles <kroosec@gmail.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
blockdev-nbd.c | 1 +
qemu-nbd.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/blockdev-nbd.c b/blockdev-nbd.c
index 18dc528..b3a2474 100644
--- a/blockdev-nbd.c
+++ b/blockdev-nbd.c
@@ -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);
}
}
diff --git a/qemu-nbd.c b/qemu-nbd.c
index ba60436..626e584 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -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);
}
}
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL v2 0/5] NBD changes for 2014-06-30
2014-06-30 12:59 [Qemu-devel] [PULL v2 0/5] NBD changes for 2014-06-30 Paolo Bonzini
2014-06-30 12:59 ` [Qemu-devel] [PULL v2 3/5] nbd: Shutdown socket before closing Paolo Bonzini
@ 2014-06-30 15:28 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2014-06-30 15:28 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: QEMU Developers
On 30 June 2014 13:59, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 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.
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-30 15:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30 12:59 [Qemu-devel] [PULL v2 0/5] NBD changes for 2014-06-30 Paolo Bonzini
2014-06-30 12:59 ` [Qemu-devel] [PULL v2 3/5] nbd: Shutdown socket before closing Paolo Bonzini
2014-06-30 15:28 ` [Qemu-devel] [PULL v2 0/5] NBD changes for 2014-06-30 Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).