Commit 3e5f6234 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging



Block patches for 2.3.0-rc1

# gpg: Signature made Thu Mar 19 15:03:26 2015 GMT using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"

* remotes/kevin/tags/for-upstream:
  block: Fix blockdev-backup not to use funky error class
  raw-posix: Deprecate aio=threads fallback without O_DIRECT
  raw-posix: Deprecate host floppy passthrough

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 33a8d5b7 5b347c54
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -503,6 +503,14 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
        error_setg_errno(errp, -ret, "Could not set AIO state");
        goto fail;
    }
    if (!s->use_aio && (bdrv_flags & BDRV_O_NATIVE_AIO)) {
        error_printf("WARNING: aio=native was specified for '%s', but "
                     "it requires cache.direct=on, which was not "
                     "specified. Falling back to aio=threads.\n"
                     "         This will become an error condition in "
                     "future QEMU versions.\n",
                     bs->filename);
    }
#endif

    s->has_discard = true;
@@ -2387,6 +2395,8 @@ static int floppy_open(BlockDriverState *bs, QDict *options, int flags,
    s->fd = -1;
    s->fd_media_changed = 1;

    error_report("Host floppy pass-through is deprecated");
    error_printf("Support for it will be removed in a future release.\n");
    return 0;
}

+4 −4
Original line number Diff line number Diff line
@@ -1574,14 +1574,14 @@ static void blockdev_backup_prepare(BlkTransactionState *common, Error **errp)

    blk = blk_by_name(backup->device);
    if (!blk) {
        error_set(errp, QERR_DEVICE_NOT_FOUND, backup->device);
        error_setg(errp, "Device '%s' not found", backup->device);
        return;
    }
    bs = blk_bs(blk);

    blk = blk_by_name(backup->target);
    if (!blk) {
        error_set(errp, QERR_DEVICE_NOT_FOUND, backup->target);
        error_setg(errp, "Device '%s' not found", backup->target);
        return;
    }
    target = blk_bs(blk);
@@ -2421,7 +2421,7 @@ void qmp_blockdev_backup(const char *device, const char *target,

    blk = blk_by_name(device);
    if (!blk) {
        error_set(errp, QERR_DEVICE_NOT_FOUND, device);
        error_setg(errp, "Device '%s' not found", device);
        return;
    }
    bs = blk_bs(blk);
@@ -2431,7 +2431,7 @@ void qmp_blockdev_backup(const char *device, const char *target,

    blk = blk_by_name(target);
    if (!blk) {
        error_set(errp, QERR_DEVICE_NOT_FOUND, target);
        error_setg(errp, "Device '%s' not found", target);
        goto out;
    }
    target_bs = blk_bs(blk);
+2 −3
Original line number Diff line number Diff line
@@ -218,6 +218,7 @@
#       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
#       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
#       2.2: 'archipelago' added, 'cow' dropped
#       2.3: 'host_floppy' deprecated
#
# @backing_file: #optional the name of the backing file (for copy-on-write)
#
@@ -881,9 +882,6 @@
#
# For the arguments, see the documentation of BlockdevBackup.
#
# Returns: Nothing on success.
#          If @device or @target is not a valid block device, DeviceNotFound.
#
# Since 2.3
##
{ 'command': 'blockdev-backup', 'data': 'BlockdevBackup' }
@@ -1245,6 +1243,7 @@
# Drivers that are supported in block device operations.
#
# @host_device, @host_cdrom, @host_floppy: Since 2.1
# @host_floppy: deprecated since 2.3
#
# Since: 2.0
##
+3 −2
Original line number Diff line number Diff line
@@ -736,8 +736,7 @@ devices. We describe here the usage for QEMU version >= 0.8.3.

On Linux, you can directly use the host device filename instead of a
disk image filename provided you have enough privileges to access
it. For example, use @file{/dev/cdrom} to access to the CDROM or
@file{/dev/fd0} for the floppy.
it. For example, use @file{/dev/cdrom} to access to the CDROM.

@table @code
@item CD
@@ -749,6 +748,8 @@ You can specify a floppy device even if no floppy is loaded. Floppy
removal is currently not detected accurately (if you change floppy
without doing floppy access while the floppy is not loaded, the guest
OS will think that the same floppy is loaded).
Use of the host's floppy device is deprecated, and support for it will
be removed in a future release.
@item Hard disks
Hard disks can be used. Normally you must specify the whole disk
(@file{/dev/hdb} instead of @file{/dev/hdb1}) so that the guest OS can
+1 −2
Original line number Diff line number Diff line
@@ -419,8 +419,7 @@ STEXI
@item -fdb @var{file}
@findex -fda
@findex -fdb
Use @var{file} as floppy disk 0/1 image (@pxref{disk_images}). You can
use the host floppy by using @file{/dev/fd0} as filename (@pxref{host_drives}).
Use @var{file} as floppy disk 0/1 image (@pxref{disk_images}).
ETEXI

DEF("hda", HAS_ARG, QEMU_OPTION_hda,
Loading