Received: from eggs.gnu.org ([208.118.235.92]:36107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sgt8O-0006Yu-4z for qemu-devel@nongnu.org; Tue, 19 Jun 2012 03:45:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sgt8M-0005KY-Bd for qemu-devel@nongnu.org; Tue, 19 Jun 2012 03:45:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sgt8M-0005KI-3M for qemu-devel@nongnu.org; Tue, 19 Jun 2012 03:45:54 -0400 From: Markus Armbruster References: <1340010604-13697-1-git-send-email-armbru@redhat.com> <1340010604-13697-3-git-send-email-armbru@redhat.com> Date: Tue, 19 Jun 2012 09:45:49 +0200 In-Reply-To: (Blue Swirl's message of "Mon, 18 Jun 2012 19:43:50 +0000") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] fdc: Move floppy geometry guessing back from block.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: kwolf@redhat.com, phrdina@redhat.com, hpoussin@reactos.org, qemu-devel@nongnu.org Blue Swirl writes: > On Mon, Jun 18, 2012 at 9:10 AM, Markus Armbruster wr= ote: >> Commit 5bbdbb46 moved it to block.c because "other geometry guessing >> functions already reside in block.c". =C2=A0Device-specific functionality >> should be kept in device code, not the block layer. =C2=A0Move it back. > > As discussed earlier, this is media specific, not device specific > (except FDriveType). How about media.c? It's floppy-(media-)specific, isn't it? We discussed separating floppy drive emulation (fdd) from floppy controller emulation. Right now, they're mixed up in qdevs isa-fdc, sysbus-fdc and SUNW,fdtwo. Separating fdd involves splitting up those qdevs. I tried, but ran into QOM infrastructure difficulties. Since that part of QOM is being improved, I decided to postpone the splitting work for a bit. I don't remember discussing a separation of floppy drive and floppy media emulation. Related project: moving hard disk geometry out of the block layer. Can't move into a device model, because we have three of them sporting geometry: IDE, SCSI and virtio disks. I guess I'll move them into a new file in hw/. media.c doesn't sound right for hard disks. disk-geo.c? I could move floppy geometry to the same file. But there's zero overlap between hard disk and floppy disk geometry, and the only consumer of floppy geometry is the floppy disk device. I don't expect that to change, and that's why I'd prefer to make floppy geometry an implementation detail of the floppy disk device, and hide it in fdc.c now, fdd.c after the split. But if you insist, I can unhide it. Comments?