nbd: Set block size to BDRV_SECTOR_SIZE

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-13-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Max Reitz 2015-02-25 13:08:25 -05:00 committed by Paolo Bonzini
parent ac97393dc7
commit 3f4726596d
5 changed files with 12 additions and 16 deletions

View file

@ -279,7 +279,6 @@ static void *nbd_client_thread(void *arg)
{
char *device = arg;
off_t size;
size_t blocksize;
uint32_t nbdflags;
int fd, sock;
int ret;
@ -292,7 +291,7 @@ static void *nbd_client_thread(void *arg)
}
ret = nbd_receive_negotiate(sock, NULL, &nbdflags,
&size, &blocksize, &local_error);
&size, &local_error);
if (ret < 0) {
if (local_error) {
fprintf(stderr, "%s\n", error_get_pretty(local_error));
@ -308,7 +307,7 @@ static void *nbd_client_thread(void *arg)
goto out_socket;
}
ret = nbd_init(fd, sock, nbdflags, size, blocksize);
ret = nbd_init(fd, sock, nbdflags, size);
if (ret < 0) {
goto out_fd;
}