qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 for 7.1 1/1] block: add 'force' parameter to 'blockdev-cha


From: Hanna Reitz
Subject: Re: [PATCH v3 for 7.1 1/1] block: add 'force' parameter to 'blockdev-change-medium' command
Date: Mon, 25 Apr 2022 12:03:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 13.04.22 00:18, Denis V. Lunev wrote:
'blockdev-change-medium' is a convinient wrapper for the following
sequence of commands:
  * blockdev-open-tray
  * blockdev-remove-medium
  * blockdev-insert-medium
  * blockdev-close-tray
and should be used f.e. to change ISO image inside the CD-ROM tray.
Though the guest could lock the tray and some linux guests like
CentOS 8.5 actually does that. In this case the execution if this
command results in the error like the following:
   Device 'scsi0-0-1-0' is locked and force was not specified,
   wait for tray to open and try again.

This situation is could be resolved 'blockdev-open-tray' by passing
flag 'force' inside. Thus is seems reasonable to add the same
capability for 'blockdev-change-medium' too.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
Acked-by: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Hanna Reitz <hreitz@redhat.com>
CC: Eric Blake <eblake@redhat.com>
CC: Markus Armbruster <armbru@redhat.com>
---
  block/qapi-sysemu.c |  3 ++-
  hmp-commands.hx     | 11 +++++++----
  monitor/hmp-cmds.c  |  4 +++-
  qapi/block.json     |  6 ++++++
  ui/cocoa.m          |  1 +
  5 files changed, 19 insertions(+), 6 deletions(-)

Thanks, applied to my block branch:

https://gitlab.com/hreitz/qemu/-/commits/block




reply via email to

[Prev in Thread] Current Thread [Next in Thread]