* [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1
@ 2015-03-19 15:16 Kevin Wolf
2015-03-19 15:16 ` [Qemu-devel] [PULL 1/3] raw-posix: Deprecate host floppy passthrough Kevin Wolf
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Kevin Wolf @ 2015-03-19 15:16 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, qemu-devel
The following changes since commit cd232acfa0d70002fed89e9293f04afda577a513:
Update version for v2.3.0-rc0 release (2015-03-17 18:58:33 +0000)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
for you to fetch changes up to 5b347c541017b9ced10e8e9bce02d25bcf04c7af:
block: Fix blockdev-backup not to use funky error class (2015-03-19 16:02:59 +0100)
----------------------------------------------------------------
Block patches for 2.3.0-rc1
----------------------------------------------------------------
Kevin Wolf (1):
raw-posix: Deprecate aio=threads fallback without O_DIRECT
Markus Armbruster (2):
raw-posix: Deprecate host floppy passthrough
block: Fix blockdev-backup not to use funky error class
block/raw-posix.c | 10 ++++++++++
blockdev.c | 8 ++++----
qapi/block-core.json | 5 ++---
qemu-doc.texi | 5 +++--
qemu-options.hx | 3 +--
qmp-commands.hx | 2 +-
tests/qemu-iotests/055 | 11 +++++++----
7 files changed, 28 insertions(+), 16 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 1/3] raw-posix: Deprecate host floppy passthrough
2015-03-19 15:16 [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1 Kevin Wolf
@ 2015-03-19 15:16 ` Kevin Wolf
2015-03-19 15:16 ` [Qemu-devel] [PULL 2/3] raw-posix: Deprecate aio=threads fallback without O_DIRECT Kevin Wolf
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2015-03-19 15:16 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, qemu-devel
From: Markus Armbruster <armbru@redhat.com>
Raise your hand if you have a physical floppy drive in a computer
you've powered on in 2015. Okay, I see we got a few weirdos in the
audience. That's okay, weirdos are welcome here.
Kidding aside, media change detection doesn't fully work, isn't going
to be fixed, and floppy passthrough just isn't earning its keep
anymore.
Deprecate block driver host_floppy now, so we can drop it after a
grace period.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/raw-posix.c | 2 ++
qapi/block-core.json | 2 ++
qemu-doc.texi | 5 +++--
qemu-options.hx | 3 +--
qmp-commands.hx | 2 +-
5 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index f0b4488..844ac21 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -2387,6 +2387,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;
}
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 42c8850..ac839af 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -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)
#
@@ -1245,6 +1246,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
##
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 8aa6dbf..0125bc7 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -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
diff --git a/qemu-options.hx b/qemu-options.hx
index c513352..ffaf327 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -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,
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 0663924..faf75da 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -2154,7 +2154,7 @@ Each json-object contain the following:
- "drv": driver format name (json-string)
- Possible values: "blkdebug", "bochs", "cloop", "dmg",
"file", "file", "ftp", "ftps", "host_cdrom",
- "host_device", "host_floppy", "http", "https",
+ "host_device", "http", "https",
"nbd", "parallels", "qcow", "qcow2", "raw",
"tftp", "vdi", "vmdk", "vpc", "vvfat"
- "backing_file": backing file name (json-string, optional)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 2/3] raw-posix: Deprecate aio=threads fallback without O_DIRECT
2015-03-19 15:16 [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1 Kevin Wolf
2015-03-19 15:16 ` [Qemu-devel] [PULL 1/3] raw-posix: Deprecate host floppy passthrough Kevin Wolf
@ 2015-03-19 15:16 ` Kevin Wolf
2015-03-19 15:16 ` [Qemu-devel] [PULL 3/3] block: Fix blockdev-backup not to use funky error class Kevin Wolf
2015-03-19 18:44 ` [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1 Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2015-03-19 15:16 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, qemu-devel
Currently, if the user requests aio=native, but forgets to choose a
cache mode that sets O_DIRECT, that request is silently ignored and raw
falls back to aio=threads.
Deprecate that behaviour so we can make it an error in future qemu
versions.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
block/raw-posix.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 844ac21..24d8582 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 3/3] block: Fix blockdev-backup not to use funky error class
2015-03-19 15:16 [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1 Kevin Wolf
2015-03-19 15:16 ` [Qemu-devel] [PULL 1/3] raw-posix: Deprecate host floppy passthrough Kevin Wolf
2015-03-19 15:16 ` [Qemu-devel] [PULL 2/3] raw-posix: Deprecate aio=threads fallback without O_DIRECT Kevin Wolf
@ 2015-03-19 15:16 ` Kevin Wolf
2015-03-19 18:44 ` [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1 Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2015-03-19 15:16 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, qemu-devel
From: Markus Armbruster <armbru@redhat.com>
Error classes are a leftover from the days of "rich" error objects.
New code should always use ERROR_CLASS_GENERIC_ERROR. Commit
b7b9d39..7c6a4ab added uses of ERROR_CLASS_DEVICE_NOT_FOUND. Replace
them.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
blockdev.c | 8 ++++----
qapi/block-core.json | 3 ---
tests/qemu-iotests/055 | 11 +++++++----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 0b50985..fbb3a79 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -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);
diff --git a/qapi/block-core.json b/qapi/block-core.json
index ac839af..f525b04 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -882,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' }
diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055
index e81d4d0..017a609 100755
--- a/tests/qemu-iotests/055
+++ b/tests/qemu-iotests/055
@@ -126,7 +126,10 @@ class TestSingleDrive(iotests.QMPTestCase):
def do_test_device_not_found(self, cmd, **args):
result = self.vm.qmp(cmd, **args)
- self.assert_qmp(result, 'error/class', 'DeviceNotFound')
+ if cmd == 'drive-backup':
+ self.assert_qmp(result, 'error/class', 'DeviceNotFound')
+ else:
+ self.assert_qmp(result, 'error/class', 'GenericError')
def test_device_not_found(self):
self.do_test_device_not_found('drive-backup', device='nonexistent',
@@ -364,7 +367,7 @@ class TestSingleTransaction(iotests.QMPTestCase):
'sync': 'full' },
}
])
- self.assert_qmp(result, 'error/class', 'DeviceNotFound')
+ self.assert_qmp(result, 'error/class', 'GenericError')
result = self.vm.qmp('transaction', actions=[{
'type': 'blockdev-backup',
@@ -373,7 +376,7 @@ class TestSingleTransaction(iotests.QMPTestCase):
'sync': 'full' },
}
])
- self.assert_qmp(result, 'error/class', 'DeviceNotFound')
+ self.assert_qmp(result, 'error/class', 'GenericError')
result = self.vm.qmp('transaction', actions=[{
'type': 'blockdev-backup',
@@ -382,7 +385,7 @@ class TestSingleTransaction(iotests.QMPTestCase):
'sync': 'full' },
}
])
- self.assert_qmp(result, 'error/class', 'DeviceNotFound')
+ self.assert_qmp(result, 'error/class', 'GenericError')
def test_target_is_source(self):
result = self.vm.qmp('transaction', actions=[{
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1
2015-03-19 15:16 [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1 Kevin Wolf
` (2 preceding siblings ...)
2015-03-19 15:16 ` [Qemu-devel] [PULL 3/3] block: Fix blockdev-backup not to use funky error class Kevin Wolf
@ 2015-03-19 18:44 ` Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2015-03-19 18:44 UTC (permalink / raw)
To: Kevin Wolf; +Cc: QEMU Developers, qemu-block
On 19 March 2015 at 15:16, Kevin Wolf <kwolf@redhat.com> wrote:
> The following changes since commit cd232acfa0d70002fed89e9293f04afda577a513:
>
> Update version for v2.3.0-rc0 release (2015-03-17 18:58:33 +0000)
>
> are available in the git repository at:
>
> git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to 5b347c541017b9ced10e8e9bce02d25bcf04c7af:
>
> block: Fix blockdev-backup not to use funky error class (2015-03-19 16:02:59 +0100)
>
> ----------------------------------------------------------------
> Block patches for 2.3.0-rc1
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-19 18:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-19 15:16 [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1 Kevin Wolf
2015-03-19 15:16 ` [Qemu-devel] [PULL 1/3] raw-posix: Deprecate host floppy passthrough Kevin Wolf
2015-03-19 15:16 ` [Qemu-devel] [PULL 2/3] raw-posix: Deprecate aio=threads fallback without O_DIRECT Kevin Wolf
2015-03-19 15:16 ` [Qemu-devel] [PULL 3/3] block: Fix blockdev-backup not to use funky error class Kevin Wolf
2015-03-19 18:44 ` [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1 Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).