History | View | Annotate | Download (2.8 kB)
nbd: consistently use ssize_t
GCC (pedantically, but correctly) considers that a negative ssize_t maybecome positive when casted to int. This may cause uninitialized variablewarnings when a function returns such a negative ssize_t and is inlined.Propagate ssize_t return types to avoid this....
nbd: consistently return negative errno values
In the next patch we need to look at the return code of nbd_wr_sync.To avoid percolating the socket_error() ugliness all around, let'shandle errors by returning negative errno values.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-nbd: move client handling to nbd.c
This patch sets up the fd handler in nbd.c instead of qemu-nbd.c. Itintroduces NBDClient, which wraps the arguments to nbd_trip in a singlestructure, so that we can add a notifier to it. This way, qemu-nbd canknow about disconnections....
qemu-nbd: remove offset argument to nbd_trip
The argument is write-only.
qemu-nbd: remove data_size argument to nbd_trip
The size of the buffer is in practice part of the protocol.
qemu-nbd: introduce NBDExport
Wrap the common parameters of nbd_trip and nbd_negotiate in asingle opaque struct.
nbd: support feature negotiation
nbd supports writing flags in bytes 24...27 of the header,and uses that for the read-only flag. Add support for itin qemu-nbd.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
nbd: sync API definitions with upstream
nbd: Clean up use of block_int.h
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Fix include statements for qemu-common.h
Use new macro QEMU_PACKED for packed structures
Most changes were made using these commands:
git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/'git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'...
NBD: Use qemu_socket functions to open TCP and UNIX sockets
This commit has the side-effect of making the qemu-nbd binarycapable of binding to IPv6 addresses. ("-b ::1", for instance).block/nbd.c fails to parse IPv6 IP addresses correctly at thispoint, but will work over IPv6 when given a hostname. It still...
Merge remote branch 'kwolf/for-anthony' into staging
Remove unused argument for nbd_client()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
nbd: Introduce NBD named exports.
This patch allows to connect Qemu using NBD protocol to an nbd-serverusing named exports.
For instance, if on the host "isoserver", in /etc/nbd-server/config, you have:
[generic][debian-500-ppc-netinst] exportname = /ISO/debian-500-powerpc-netinst.iso...
Move stdbool.h
Move inclusion of stdbool.h to common header files, instead of includingin an ad-hoc manner.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Update to a hopefully more future proof FSF address
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Update FSF address in GPL/LGPL boilerplate
The attached patch updates the FSF address in the GPL/LGPL boilerplatein most GPL/LGPLed files, and also in COPYING.LIB.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
qemu-nbd: remove useless parameter from nbd_negotiate() (Laurent Vivier)
This patch removes "BlockDriverState *bs" from nbd_negotiate() becauseit is not used.
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.fr>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Allow QEMU to connect directly to an NBD server, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4838 c046a42c-6fe2-441c-8c8c-71466251a162
Add a parameter to disable host cache, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4836 c046a42c-6fe2-441c-8c8c-71466251a162
Merge NBD client/server, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4834 c046a42c-6fe2-441c-8c8c-71466251a162
qemu-nbd tool (Anthony Liguori)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4596 c046a42c-6fe2-441c-8c8c-71466251a162