History | View | Annotate | Download (13.7 kB)
Remove NULL checks for bdrv_new return value
It's an indirect call to qemu_malloc, which never returns an error.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
use qemu_blockalign consistently
Use qemu_blockalign for all allocations in the block layer. This allowsincreasing the required alignment, which is need to support O_DIRECT ondevices with large block sizes.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
nbd: correctly manage default port
block/nbd.c: use default port number when none is specifiedqemu-nbd.c: use IANA-assigned port number: 10809
Signed-off-by: Laurent Vivier <laurent@vivier.eu>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Merge remote branch 'kwolf/for-anthony' into staging
Respect return value from nbd_client()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Remove unused argument for nbd_client()
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...
qemu-nbd: Improve error reporting
- use err(3) instead of errx(3) if errno is available to report why failed- let fail prior to daemon(3) if opening a nbd file is likely to fail after daemonizing to avoid silent failure exit- add missing 'ret = 1' when unix_socket_outgoing failed...
Replace calls of old bdrv_open
What is known today as bdrv_open2 becomes the new bdrv_open. All remainingcallers of the old function are converted to the new one. In some places theyeven know the right format, so they should have used bdrv_open2 from the...
qemu-nbd: Fix invalid usage of the first argument of errx
errx takes the exit status of a process as the firstargument. Passing errno to it is wrong. Instead thepatch lets errx take EXIT_FAILURE.
Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qemu-nbd: Fix return value handling of bdrv_open
bdrv_open may return -errno so we have to checkif the return value is '< 0', not '== -1'.
read-only: minor cleanup
Really use read-only flags for opening the file when asked for read-only
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
win32: pair qemu_memalign() with qemu_vfree()
Win32 suffers from a very big memory leak when dealing with SCSI devices.Each read/write request allocates memory with qemu_memalign (ieVirtualAlloc) but frees it with qemu_free (ie free).Pair all qemu_memalign() calls with qemu_vfree() to prevent such leaks....
Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE.
Instead of using the field 'readonly' of the BlockDriverState struct for passing the request,...
qemu-nbd: fix OpenBSD linker warning
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Compile qemu-nbd also on OpenBSD and Solaris
basename() needs #include <libgen.h>.
No prototype for daemon() is available on Solaris, but linksucceeds.
Fix Sparse warnings: "Using plain integer as NULL pointer"
Update to a hopefully more future proof FSF address
Fix warning in qemu-nbd.c
qemu-nbd.c:349: error: ignoring return value of 'daemon', declared with attribute warn_unused_result
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
qemu-nbd: fix options: -b (--bind) expects an argument (IFACE) (Uri Lublin)
Rebased for qemu tree.
Signed-off-by: Uri Lublin <uril@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6246 c046a42c-6fe2-441c-8c8c-71466251a162
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>...
Fix undeclared symbol warnings from sparse
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
Expand cache= option and use write-through caching by default
This patch changes the cache= option to accept none, writeback, or writethoughto control the host page cache behavior. By default, writethrough caching isnow used which internally is implemented by using O_DSYNC to open the disk...
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-nbd --version to show the application name dynamically, byCarlo Marcelo Arenas Belon.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4893 c046a42c-6fe2-441c-8c8c-71466251a162
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
Allow to share a disk image via nbd, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4837 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
Cleanup qemu-nbd related code, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4829 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