From: Kevin Wolf <kwolf@redhat.com>
To: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: josh.durgin@dreamhost.com, tailai.ly@taobao.com,
Peter Lieven <pl@kamp.de>,
qemu-devel@nongnu.org, rjones@redhat.com, stefanha@redhat.com,
morita.kazutaka@lab.ntt.co.jp
Subject: Re: [Qemu-devel] block: Review of .has_zero_init use
Date: Wed, 26 Jun 2013 09:36:27 +0200 [thread overview]
Message-ID: <20130626073627.GA2720@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <20130626064604.GE9966@in.ibm.com>
Am 26.06.2013 um 08:46 hat Bharata B Rao geschrieben:
> On Wed, Jun 26, 2013 at 07:59:27AM +0200, Peter Lieven wrote:
> >
> > Am 26.06.2013 um 05:14 schrieb Bharata B Rao <bharata@linux.vnet.ibm.com>:
> >
> > > On Tue, Jun 25, 2013 at 01:39:11PM +0200, Kevin Wolf wrote:
> > >>
> > >> Can you please review for the gluster, rbd, sheepdog and ssh driver
> > >> whether it's safe to assume that the image reads back as zeros after
> > >> bdrv_create?
> > >
> > > Gluster supports both file and block backends. While the above is true for
> > > file backend (which uses ftruncate), the same is not true for
> > > block backend (which uses lvcreate & lvresize).
> > >
> > > So overall it is not safe to assume that an image on GlusterFS volume
> > > reads back as zeroes after create.
> >
> > Okay, so for safety we have to return has_zero_init = 0. Erroneously assuming
> > a device is zero initialized can bring severe filesystem corruption.
> >
> > Do you see a way to query the information of the underlaying
> > backend from the storage and return 1 or 0 conditionally?
>
> Right now no. There have been efforts to get the capabilities (file, block etc)
> of gluster volume from gluster cmdline, but there haven't been discussions
> about providing such capabilities from libgfapi which is the library
> QEMU uses to talk with gluster.
>
> I see has_zero_init being used from qemu-img convert path. Is there any
> other use of this in QEMU ?
No, it's the only user.
So what this means is that using 'qemu-img convert' with a glusterfs
target corrupts the image if the volume is backed by a block device.
Kevin
prev parent reply other threads:[~2013-06-26 7:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 11:39 [Qemu-devel] block: Review of .has_zero_init use Kevin Wolf
2013-06-25 12:05 ` Richard W.M. Jones
2013-06-25 12:27 ` Kevin Wolf
2013-06-25 13:11 ` MORITA Kazutaka
2013-06-25 13:20 ` Kevin Wolf
2013-06-25 13:42 ` MORITA Kazutaka
2013-06-25 13:45 ` Kevin Wolf
2013-06-25 15:06 ` Josh Durgin
2013-06-26 3:14 ` Bharata B Rao
2013-06-26 5:59 ` Peter Lieven
2013-06-26 6:46 ` Bharata B Rao
2013-06-26 7:36 ` Kevin Wolf [this message]
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=20130626073627.GA2720@dhcp-200-207.str.redhat.com \
--to=kwolf@redhat.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=josh.durgin@dreamhost.com \
--cc=morita.kazutaka@lab.ntt.co.jp \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=stefanha@redhat.com \
--cc=tailai.ly@taobao.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).