qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Peter Lieven <pl@dlhnet.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>, Jeff Cody <jcody@redhat.com>,
	qemu-devel@nongnu.org, stefanha@redhat.com, sw@weilnetz.de
Subject: Re: [Qemu-devel] [PATCH 1/7] block: only force IO completion in .bdrv_truncate if we are shrinking
Date: Thu, 7 Mar 2013 11:00:15 +0100	[thread overview]
Message-ID: <20130307100015.GH2536@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <CFA5F64C-1A17-433F-83EB-29C2D0B77E3E@dlhnet.de>

Am 07.03.2013 um 10:25 hat Peter Lieven geschrieben:
> 
> Am 07.03.2013 um 10:22 schrieb Kevin Wolf <kwolf@redhat.com>:
> 
> > Am 07.03.2013 um 10:16 hat Peter Lieven geschrieben:
> >>>> If bs->growable is 1 for all drivers, whats the fix status of CVE-2008-0928? This
> >>>> flag was introduced as a fix for this problem.
> >>>> 
> >>>> bdrv_check_byte_request() does nothing useful if bs->growable is 1.
> >>> 
> >>> Don't ignore the difference between bdrv_open() and bdrv_file_open().
> >>> Typically you have two BDSes: On top there is e.g. a qcow2 BDS that is
> >>> opened through bdrv_open() and has bs->growable = false. Its bs->file is
> >>> using the file protocol (raw-posix driver) and opened by
> >>> bdrv_file_open(). This one has bs->file->growable = true so that qcow2
> >>> can write to newly allocated areas without calling bdrv_truncate()
> >>> first.
> >> 
> >> Sorry, I have to admin I am little confused by what is happening in bdrv_open().
> >> 
> >> However, what I can say is that bs->growable is 1 for an iSCSI backed
> >> harddrive and I wonder how this can happen if bdrv_file_open is not used for
> >> opening it because that is the only place where bs->growable is set to 1.
> >> 
> >> cmdline:
> >> x86_64-softmmu/qemu-system-x86_64 -k de -enable-kvm -m 1024 -drive if=virtio,file=iscsi://172.21.200.31/iqn.2001-05.com.equallogic:0-8a0906-16470e107-713001aa6de511e0-001-test/0 -vnc :1 -boot dc -monitor stdio
> > 
> > It is used for the iscsi driver. You have a raw BDS (growable == false)
> > on top of an iscsi one (growable == true).
> 
> Ok, but growable == true is wrong for the iSCSI driver isn`t it?

I guess it depends on your definition. If you say that growable includes
the capability of growing the image, then yes, it's wrong. If you only
interpret it as permission to write beyond EOF (if the driver supports
that), then it's right even though any such attempt will result in an
error.

Practically speaking, the difference is between -EIO returned from
bdrv_check_byte_request() and -EIO from iscsi_aio_write16_cb(), i.e.
the result is the same.

Kevin

  reply	other threads:[~2013-03-07 10:00 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 14:46 [Qemu-devel] [PATCH 0/7] Initial VHDX support (and a bug fix for QCOW) Jeff Cody
2013-03-06 14:47 ` [Qemu-devel] [PATCH 1/7] block: only force IO completion in .bdrv_truncate if we are shrinking Jeff Cody
2013-03-06 17:50   ` Peter Lieven
2013-03-06 18:06     ` Paolo Bonzini
2013-03-06 18:14       ` Jeff Cody
2013-03-06 18:31         ` Paolo Bonzini
2013-03-06 18:48           ` Jeff Cody
2013-03-06 19:03             ` Peter Lieven
2013-03-06 20:39               ` Paolo Bonzini
2013-03-07  8:50                 ` Kevin Wolf
2013-03-07  8:56                   ` Peter Lieven
2013-03-07  9:03                     ` Kevin Wolf
2013-03-07  9:16                       ` Peter Lieven
2013-03-07  9:22                         ` Kevin Wolf
2013-03-07  9:25                           ` Peter Lieven
2013-03-07 10:00                             ` Kevin Wolf [this message]
2013-03-07 10:22                               ` Peter Lieven
2013-03-07 16:45                   ` Paolo Bonzini
2013-03-07  8:53                 ` Peter Lieven
2013-03-07  8:59                   ` Kevin Wolf
2013-03-07 16:09                   ` Paolo Bonzini
2013-03-08  7:53                     ` Peter Lieven
2013-03-08  9:23                       ` Paolo Bonzini
2013-03-08  9:35                         ` Kevin Wolf
2013-03-08 11:46                           ` Peter Lieven
2013-03-08 11:56                             ` Kevin Wolf
2013-03-09  9:36                               ` Peter Lieven
     [not found]         ` <51378A23.5090301@dlhnet.de>
     [not found]           ` <20130306184217.GC3743@localhost.localdomain>
2013-03-06 18:46             ` Peter Lieven
2013-03-06 18:27       ` Peter Lieven
2013-03-07  8:57         ` Kevin Wolf
2013-03-06 18:32     ` Jeff Cody
2013-03-06 20:22       ` Paolo Bonzini
2013-03-06 14:47 ` [Qemu-devel] [PATCH 2/7] qemu: add castagnoli crc32c checksum algorithm Jeff Cody
2013-03-06 14:47 ` [Qemu-devel] [PATCH 3/7] block: vhdx header for the QEMU support of VHDX images Jeff Cody
2013-03-07 13:15   ` Stefan Hajnoczi
2013-03-07 13:43     ` Jeff Cody
2013-03-06 14:48 ` [Qemu-devel] [PATCH 4/7] block: initial VHDX driver support framework - supports open and probe Jeff Cody
2013-03-07 14:30   ` Stefan Hajnoczi
2013-03-07 15:23     ` Jeff Cody
2013-03-07 16:12       ` Stefan Hajnoczi
2013-03-08  8:35         ` Kevin Wolf
2013-03-06 14:48 ` [Qemu-devel] [PATCH 5/7] block: add read-only support to VHDX image format Jeff Cody
2013-03-06 14:48 ` [Qemu-devel] [PATCH 6/7] block: add header update capability for VHDX images Jeff Cody
2013-03-07 14:50   ` Stefan Hajnoczi
2013-03-07 15:33     ` Jeff Cody
2013-03-07 16:15       ` Stefan Hajnoczi
2013-03-06 14:48 ` [Qemu-devel] [PATCH 7/7] block: add write support " Jeff Cody
2013-03-07 15:59   ` Stefan Hajnoczi
2013-03-07 16:05     ` Jeff Cody

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=20130307100015.GH2536@dhcp-200-207.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=jcody@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=pl@dlhnet.de \
    --cc=qemu-devel@nongnu.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
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).