Denis V. Lunev fa21e6faa6 nbd: fix max_discard/max_transfer_length
nbd_co_discard calls nbd_client_session_co_discard which uses uint32_t
as the length in bytes of the data to discard due to the following
definition:

struct nbd_request {
    uint32_t magic;
    uint32_t type;
    uint64_t handle;
    uint64_t from;
    uint32_t len; <-- the length of data to be discarded, in bytes
} QEMU_PACKED;

Thus we should limit bl_max_discard to UINT32_MAX >> BDRV_SECTOR_BITS to
avoid overflow.

NBD read/write code uses the same structure for transfers. Fix
max_transfer_length accordingly.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Peter Lieven <pl@kamp.de>
CC: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-02-06 17:24:22 +01:00
2015-02-02 16:55:10 +01:00
…
2015-01-29 16:45:45 +00:00
2014-11-14 12:15:40 +01:00
2015-02-05 17:16:14 +01:00
2015-02-03 13:42:40 +01:00
2015-02-06 17:24:22 +01:00
2015-02-02 16:55:10 +01:00
…
…
…
…
…
…
2015-02-02 16:55:11 +01:00
2015-01-07 16:16:26 +01:00
…
2015-01-26 12:27:05 +01:00
…
2014-10-24 12:19:11 +01:00
2014-09-26 13:37:06 -04:00
2015-02-05 17:16:14 +01:00
2015-02-06 17:24:22 +01:00
2015-01-15 10:44:13 +03:00
2014-12-12 15:48:26 +00:00
2015-02-06 17:24:22 +01:00
…
…
2015-02-05 17:16:14 +01:00
…
2015-01-14 10:38:57 +01:00
…
…
…
2015-02-06 17:24:21 +01:00
2014-12-09 21:48:34 +00:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
S
Description
A QEMU emulator for legacy Apple devices
Readme GPL-2.0
557 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 82.9%
C++ 6.4%
Python 3.3%
Dylan 2.9%
Shell 1.6%
Other 2.7%