diff options
author | Ekaterina Tumanova | 2015-02-16 12:47:58 +0100 |
---|---|---|
committer | Kevin Wolf | 2015-03-10 14:02:22 +0100 |
commit | 0eb28a42284ec32e6f283985d2d638474a05eba4 (patch) | |
tree | 922a82eb6b0aa19aabe1a21713814a9f0c79255c /hw/ide/qdev.c | |
parent | block-backend: Add wrappers for blocksizes and geometry probing (diff) | |
download | qemu-0eb28a42284ec32e6f283985d2d638474a05eba4.tar.gz qemu-0eb28a42284ec32e6f283985d2d638474a05eba4.tar.xz qemu-0eb28a42284ec32e6f283985d2d638474a05eba4.zip |
BlockConf: Call backend functions to detect geometry and blocksizes
geometry: hd_geometry_guess function autodetects the drive geometry.
This patch adds a block backend call, that probes the backing device
geometry. If the inner driver method is implemented and succeeds
(currently only for DASDs), the blkconf_geometry will pass-through
the backing device geometry. Otherwise will fallback to old logic.
blocksize: This patch initializes blocksize properties to 0.
In order to set the property a blkconf_blocksizes was introduced.
If user didn't set physical or logical blocksize, it will
retrieve its value from a driver (only succeeds for DASD), otherwise
it will set default 512 value.
The blkconf_blocksizes call was added to all users of BlkConf.
Signed-off-by: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1424087278-49393-6-git-send-email-tumanova@linux.vnet.ibm.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/qdev.c')
-rw-r--r-- | hw/ide/qdev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index b4103fa009..788b36133c 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -163,6 +163,7 @@ static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind) return -1; } + blkconf_blocksizes(&dev->conf); if (dev->conf.logical_block_size != 512) { error_report("logical_block_size must be 512 for IDE"); return -1; |