mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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:
parent
ac97393dc7
commit
3f4726596d
5 changed files with 12 additions and 16 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue