QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Maxim Levitsky <mlevitsk@redhat.com>, qemu-devel@nongnu.org
Cc: Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>,
	integration@gluster.org, sheepdog@lists.wpkg.org,
	Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-block@nongnu.org, Jeff Cody <codyprime@gmail.com>,
	Stefan Weil <sw@weilnetz.de>, Peter Lieven <pl@kamp.de>,
	"Richard W.M. Jones" <rjones@redhat.com>,
	Max Reitz <mreitz@redhat.com>, "Denis V. Lunev" <den@openvz.org>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Liu Yuan <namei.unix@gmail.com>,
	Jason Dillaman <dillaman@redhat.com>
Subject: Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers
Date: Thu, 26 Mar 2020 08:20:40 -0500
Message-ID: <922a6eb5-cb33-d2e4-ba0b-15078d1a6c59@redhat.com> (raw)
In-Reply-To: <20200326011218.29230-3-mlevitsk@redhat.com>

On 3/25/20 8:12 PM, Maxim Levitsky wrote:
> Instead of checking the .bdrv_co_create_opts to see if we need the failback,

fallback

> just implement the .bdrv_co_create_opts in the drivers that need it.
> 
> This way we don't break various places that need to know if the underlying
> protocol/format really supports image creation, and this way we still
> allow some drivers to not support image creation.
> 
> Fixes: fd17146cd93d1704cd96d7c2757b325fc7aac6fd
> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1816007
> 
> Note that technically this driver reverts the image creation failback

fallback

> for the vxhs driver since I don't have a means to test it,
> and IMHO it is better to leave it not supported as it was prior to
> generic image creation patches.
> 
> Also drop iscsi_create_opts which was left accidently

accidentally

> 
> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
> ---
> +++ b/block/file-posix.c
> @@ -3513,6 +3513,8 @@ static BlockDriver bdrv_host_device = {
>       .bdrv_reopen_prepare = raw_reopen_prepare,
>       .bdrv_reopen_commit  = raw_reopen_commit,
>       .bdrv_reopen_abort   = raw_reopen_abort,
> +    .bdrv_co_create_opts = bdrv_co_create_opts_simple,
> +    .create_opts         = &bdrv_create_opts_simple,

I'd drop the leading & for consistency with the rest of this struct 
initializer.


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  parent reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  1:12 [PATCH 0/2] Fix the generic image creation code Maxim Levitsky
2020-03-26  1:12 ` [PATCH 1/2] block: pass BlockDriver reference to the .bdrv_co_create Maxim Levitsky
2020-03-26 13:18   ` Eric Blake
2020-03-26 13:22     ` Maxim Levitsky
2020-03-26 13:27       ` Eric Blake
2020-03-26  1:12 ` [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers Maxim Levitsky
2020-03-26 11:20   ` Max Reitz
2020-03-26 13:20   ` Eric Blake [this message]
2020-03-26 13:28     ` Kevin Wolf
2020-03-26 13:35       ` Eric Blake
2020-03-26 13:39         ` Max Reitz
2020-03-26 13:30     ` Maxim Levitsky
2020-03-26 10:55 ` [PATCH 0/2] Fix the generic image creation code Denis V. Lunev
2020-03-26 12:23 ` Max Reitz
2020-03-26 13:38   ` Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=922a6eb5-cb33-d2e4-ba0b-15078d1a6c59@redhat.com \
    --to=eblake@redhat.com \
    --cc=codyprime@gmail.com \
    --cc=den@openvz.org \
    --cc=dillaman@redhat.com \
    --cc=fam@euphon.net \
    --cc=integration@gluster.org \
    --cc=kwolf@redhat.com \
    --cc=mlevitsk@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=namei.unix@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    --cc=ronniesahlberg@gmail.com \
    --cc=sheepdog@lists.wpkg.org \
    --cc=stefanha@redhat.com \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git