From 92a539d22e0da14d5395eb2c2c8bee162ebdb0b8 Mon Sep 17 00:00:00 2001 From: Markus Armbruster <armbru@redhat.com> Date: Tue, 17 Mar 2015 17:02:20 +0100 Subject: raw-posix: Deprecate host floppy passthrough 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 ++ 1 file changed, 2 insertions(+) (limited to 'block') 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; } -- cgit v1.1 From 965182549cee6fa337f0e72cde4d5787f35f33ac Mon Sep 17 00:00:00 2001 From: Kevin Wolf <kwolf@redhat.com> Date: Tue, 17 Mar 2015 13:45:21 +0100 Subject: raw-posix: Deprecate aio=threads fallback without O_DIRECT 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(+) (limited to 'block') 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; -- cgit v1.1