From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMBFX-00007X-Gy for qemu-devel@nongnu.org; Fri, 13 Feb 2015 03:05:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMBFR-0007PM-Li for qemu-devel@nongnu.org; Fri, 13 Feb 2015 03:05:19 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:49803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMBFR-0007P1-Cw for qemu-devel@nongnu.org; Fri, 13 Feb 2015 03:05:13 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Feb 2015 08:05:10 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 6FAF4219006C for ; Fri, 13 Feb 2015 08:05:03 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1D858Jr64618614 for ; Fri, 13 Feb 2015 08:05:08 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1D30hIr010960 for ; Thu, 12 Feb 2015 22:00:44 -0500 Message-ID: <54DDB033.1080700@de.ibm.com> Date: Fri, 13 Feb 2015 09:05:07 +0100 From: Christian Borntraeger MIME-Version: 1.0 References: <1421678101-44779-1-git-send-email-tumanova@linux.vnet.ibm.com> <20150212154653.GB4054@stefanha-thinkpad.redhat.com> <54DCD80E.5030608@de.ibm.com> <20150213075039.GA4405@noname.redhat.com> In-Reply-To: <20150213075039.GA4405@noname.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 0/5] Geometry and blocksize detection for backing devices. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: thuth@linux.vnet.ibm.com, Stefan Hajnoczi , Ekaterina Tumanova , Public KVM Mailing List , armbru@redhat.com, dahi@linux.vnet.ibm.com, stefanha@redhat.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com, mihajlov@linux.vnet.ibm.com Am 13.02.2015 um 08:50 schrieb Kevin Wolf: > Am 12.02.2015 um 17:42 hat Christian Borntraeger geschrieben: >> Am 12.02.2015 um 16:46 schrieb Stefan Hajnoczi: >>> On Mon, Jan 19, 2015 at 03:34:56PM +0100, Ekaterina Tumanova wrote: >>>> Updates v5 -> v6: >>>> >>>> Minor Updates according the last review from Stefan Hajnoczi: >>>> 1. Do not change the flow of code, factored out of raw_probe_alignment. >>>> 2. added #ifdef __linux__ in 2 places of raw-posix.c, mentioned by reviewer. >>>> 3. adjusted the comment hdev_probe_geometry according suggestment. >>>> 4. use bdrv_nb_sectors(bs) instead of bs->total_sectors. >>>> 5. do not discard error blk_probe_blocksizes(). now has rc. >>>> 6. put the 512-byte default blocksize value in blkconf_blocksizes. >>>> 7. drop the default parameter from the DEFINE_PROP_BLOCKSIZE() macro. >>> >>> Unfortunately this series breaks "make check" so it cannot be merged: >>> >>> GTESTER check-qtest-x86_64 >>> qemu-system-x86_64: logical_block_size must be 512 for IDE >>> qemu-system-x86_64: Device initialization failed. >>> qemu-system-x86_64: Initialization of device ide-cd failed >>> Broken pipe >>> GTester: last random seed: R02S942fac7e56eff09e8ab7a7f7fecf847e >>> >> >> This particular message came in with >> >> commit d20051856cd2fa8f10fed2d2a0b2751de5f7b20d >> Author: Kevin Wolf >> Date: Wed Dec 3 13:21:32 2014 +0100 >> >> ide: Check validity of logical block size >> >> so something like >> diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c >> index 353854c..2680275 100644 >> --- a/hw/ide/qdev.c >> +++ b/hw/ide/qdev.c >> @@ -163,7 +163,8 @@ static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind) >> return -1; >> } >> >> - if (dev->conf.logical_block_size != 512) { >> + if (dev->conf.logical_block_size != 512 && >> + dev->conf.logical_block_size != 0) { >> error_report("logical_block_size must be 512 for IDE"); >> return -1; >> } >> >> >> will fix this. > > It would probably be better to set the default first and then make sure > that the final value, no matter whether explicitly specified or default, > is 512. > > Kevin +1 Yes, this should minimize the impact.