From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYbZX-0003JX-0N for qemu-devel@nongnu.org; Mon, 29 Sep 2014 10:05:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYbZQ-0003QW-0C for qemu-devel@nongnu.org; Mon, 29 Sep 2014 10:05:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYbZP-0003Pd-PF for qemu-devel@nongnu.org; Mon, 29 Sep 2014 10:04:55 -0400 From: Markus Armbruster References: <1410891148-28849-1-git-send-email-armbru@redhat.com> <1410891148-28849-19-git-send-email-armbru@redhat.com> <20140929131237.GG3910@noname.str.redhat.com> Date: Mon, 29 Sep 2014 16:04:44 +0200 In-Reply-To: <20140929131237.GG3910@noname.str.redhat.com> (Kevin Wolf's message of "Mon, 29 Sep 2014 15:12:37 +0200") Message-ID: <87eguujzer.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 18/23] blockdev: Fix blockdev-add not to create IDE drive (0, 0) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: benoit.canet@nodalink.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mreitz@redhat.com Kevin Wolf writes: > Am 16.09.2014 um 20:12 hat Markus Armbruster geschrieben: >> blockdev_init() always creates a DriveInfo, but only drive_new() fills >> it in. qmp_blockdev_add() leaves it blank. This results in a drive >> with type = IF_IDE, bus = 0, unit = 0. Screwed up in commit ee13ed1c. >> >> Board initialization code looking for IDE drive (0,0) can pick up one >> of these bogus drives. Not sure whether getting the QMP command >> executed early enough is likely in practice, though. >> >> Fix by creating DriveInfo in drive_new(). Block backends created by >> blockdev-add don't get one. >> >> A few places assume a block backend always has a DriveInfo. Fix them >> up. >> >> Signed-off-by: Markus Armbruster > > I think I would change the subject line to describe that blockdev-add > devices don't get a DriveInfo any more. The IF_IDE = 0 bug is real, but > probably not the most important part of this patch. > > As you already mentioned, you need to squash in some parts of patch 19 > for this to be correct (the changed if conditions in do_drive_del and > blockdev_mark_auto_del). You may still leave patch 19 for the removal > of enable_auto_del if you like, or squash in the whole patch. I'll see how the reworked pair of patches turns out, then think about the subject line.