qemu-nbd: remove data_size argument to nbd_trip

The size of the buffer is in practice part of the protocol.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2011-10-07 14:35:58 +02:00
parent 94607e7a77
commit 3777b09fd7
3 changed files with 7 additions and 7 deletions

View file

@ -35,8 +35,6 @@
#define SOCKET_PATH "/var/lock/qemu-nbd-%s"
#define NBD_BUFFER_SIZE (1024*1024)
static int sigterm_wfd;
static int verbose;
static char *device;
@ -541,7 +539,7 @@ int main(int argc, char **argv)
for (i = 1; i < nb_fds && ret; i++) {
if (FD_ISSET(sharing_fds[i], &fds)) {
if (nbd_trip(bs, sharing_fds[i], fd_size, dev_offset,
nbdflags, data, NBD_BUFFER_SIZE) != 0) {
nbdflags, data) != 0) {
close(sharing_fds[i]);
nb_fds--;
sharing_fds[i] = sharing_fds[nb_fds];