qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>,
	Public KVM Mailing List <qemu-devel@nongnu.org>
Cc: kwolf@redhat.com, thuth@linux.vnet.ibm.com, armbru@redhat.com,
	mihajlov@linux.vnet.ibm.com, dahi@linux.vnet.ibm.com,
	stefanha@redhat.com, cornelia.huck@de.ibm.com,
	pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v5 0/5] Geometry and blocksize detection for backing devices.
Date: Thu, 18 Dec 2014 16:59:50 +0100	[thread overview]
Message-ID: <5492F9F6.3060004@de.ibm.com> (raw)
In-Reply-To: <1418901484-12988-1-git-send-email-tumanova@linux.vnet.ibm.com>

Am 18.12.2014 um 12:17 schrieb Ekaterina Tumanova:
> Updates v4 -> v5:
> 
> Minor Updates according the last review from Markus:
> 1. update commit message for patch 2
> 2. fix comment typos
> 3. fix check_for_dasd to return -1 instead of -ENOTSUP
> 
> Thanks,
> Kate.
> 
> ---------------------------------------------------------------
>    Patchset Description (didn't change):
> 
> Proper geometry and blocksize information is vital for support of
> DASD/ECKD drives in Linux guests. Otherwise things will fail in
> certain cases.
> 
> The existing geometry and blocksize qemu defaults have no sense
> for DASD drives (hd_geometry_guess detection and 512 for sizes).
> Setting this information manually in XML file is far from user-friendly,
> as the admin has to manually look up the properties of the
> host disks and then modify the guest definition accordingly.
> 
> Since Linux uses DASDs as normal block devices, we actually
> want to use virtio-blk to pass those to KVM guests.
> 
> In order to avoid any change in behavior of other drives, the DASD
> special casing was advised. We call ioctl BIODASDINFO2 on the block
> device, which will only succeed if the device is really a DASD.
> 
> In order to retrieve the underlying device geometry and blocksizes
> a new block-backend functions and underlying driver functions were
> introduced (blk_probe_blocksizes anf blk_probe_geometry wrappers
> and corresponding bdrv_xxxxxx functions).
> 
> As for now only "host_device" driver received new detection methods.
> For "raw" we call childs method as usual. In future one may update
> other drivers to add some other detection heuristics.
> 
> If the host_device appears to be a DASD, the driver functions
> (hdev_probe_blocksizes and hdev_probe_geometry) will call certain
> ioctls in order to detect geometry and blocksizes of the underlying device.
> if probing failed bdrv_probe_blocksizes caller will set defaults,
> and bdrv_probe_geometry will fail to allow fallback to old detection logic.
> 
> The front-end (BlockConf API) was updated:
> 1. a new blkconf_blocksizes function was added. It doesn't
> change user-defined blocksize values. If properties are unset, it will
> set values, returned by blk_probe_backend. In order to allow this logic,
> blocksize properties were initialized with 0. (driver will return 512 if
> backing device probing didn't succeed or if driver method is not defined).
> 2. hd_geometry guess was changed to firstly try to retrieve values via
> blk_probe_geometry and if it fails, fallback to the old logic.
> 
> Ekaterina Tumanova (5):
>   block: add bdrv functions for geometry and blocksize
>   raw-posix: Refactor logical block size detection.
>   block: Add driver methods to probe blocksizes and geometry
>   block-backend: Add wrappers for blocksizes and geometry probing
>   BlockConf: Call backend functions to detect geometry and blocksizes
> 
>  block.c                        |  35 +++++++++++
>  block/block-backend.c          |  10 +++
>  block/raw-posix.c              | 138 ++++++++++++++++++++++++++++++++++++-----
>  block/raw_bsd.c                |  14 +++++
>  hw/block/block.c               |  15 +++++
>  hw/block/hd-geometry.c         |  10 ++-
>  hw/block/nvme.c                |   1 +
>  hw/block/virtio-blk.c          |   1 +
>  hw/core/qdev-properties.c      |   3 +-
>  hw/ide/qdev.c                  |   1 +
>  hw/scsi/scsi-disk.c            |   1 +
>  hw/usb/dev-storage.c           |   1 +
>  include/block/block.h          |  13 ++++
>  include/block/block_int.h      |  15 +++++
>  include/hw/block/block.h       |   5 +-
>  include/sysemu/block-backend.h |   2 +
>  16 files changed, 244 insertions(+), 21 deletions(-)
> 

Kevin, Stefan,

Are you ok with the patches? If yes, can you take care of these patches in the block tree?

Christian

  parent reply	other threads:[~2014-12-18 16:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 11:17 [Qemu-devel] [PATCH v5 0/5] Geometry and blocksize detection for backing devices Ekaterina Tumanova
2014-12-18 11:18 ` [Qemu-devel] [PATCH v5 1/5] block: add bdrv functions for geometry and blocksize Ekaterina Tumanova
2014-12-18 11:18 ` [Qemu-devel] [PATCH v5 2/5] raw-posix: Refactor logical block size detection Ekaterina Tumanova
2015-01-02 11:52   ` Stefan Hajnoczi
2015-01-13 10:03     ` Ekaterina Tumanova
2015-01-13 15:24       ` Stefan Hajnoczi
2014-12-18 11:18 ` [Qemu-devel] [PATCH v5 3/5] block: Add driver methods to probe blocksizes and geometry Ekaterina Tumanova
2014-12-18 12:43   ` Thomas Huth
2015-01-02 12:11   ` Stefan Hajnoczi
2014-12-18 11:18 ` [Qemu-devel] [PATCH v5 4/5] block-backend: Add wrappers for blocksizes and geometry probing Ekaterina Tumanova
2014-12-18 14:45   ` Thomas Huth
2015-01-02 12:34   ` Stefan Hajnoczi
2014-12-18 11:18 ` [Qemu-devel] [PATCH v5 5/5] BlockConf: Call backend functions to detect geometry and blocksizes Ekaterina Tumanova
2014-12-18 14:55   ` Thomas Huth
2015-01-02 12:46   ` Stefan Hajnoczi
2014-12-18 15:59 ` Christian Borntraeger [this message]
2015-01-02 12:57   ` [Qemu-devel] [PATCH v5 0/5] Geometry and blocksize detection for backing devices Stefan Hajnoczi
2015-01-13  8:32     ` Christian Borntraeger
2015-01-13 10:51       ` Markus Armbruster
2015-01-13 16:04         ` Stefan Hajnoczi
2015-01-13 17:27           ` Markus Armbruster
2015-01-13 19:07           ` Christian Borntraeger
2015-01-14 13:57             ` Stefan Hajnoczi
2015-01-02 11:30 ` Stefan Hajnoczi
2015-01-13  9:59   ` Ekaterina Tumanova

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=5492F9F6.3060004@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=armbru@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dahi@linux.vnet.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=mihajlov@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@linux.vnet.ibm.com \
    --cc=tumanova@linux.vnet.ibm.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).