From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hp9Gg-0007l6-4F for qemu-devel@nongnu.org; Fri, 18 May 2007 16:41:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hp9Ge-0007jD-Hm for qemu-devel@nongnu.org; Fri, 18 May 2007 16:41:41 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hp9Ge-0007j5-Fp for qemu-devel@nongnu.org; Fri, 18 May 2007 16:41:40 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hp9Ge-0007hu-0Q for qemu-devel@nongnu.org; Fri, 18 May 2007 16:41:40 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Block driver and constant sector size Date: Fri, 18 May 2007 21:41:35 +0100 References: <4645ECE2.4050408@videotron.ca> In-Reply-To: <4645ECE2.4050408@videotron.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705182141.36421.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jonathan Phenix On Saturday 12 May 2007, Jonathan Phenix wrote: > Hi, > > currently the block driver in qemu only handles blocks (or sectors) > which are 512 bytes long, >... > Then, each probe functions should be modified to reject sector size > which is not 512 bytes, except for the raw block driver, which will be > modified to accept any block sizes. This change would probably solve the > whole problem without having a negative impact on the rest of the code. > > Is it the right way to solve the problem? If this solution is accepted, > I will code it and submit a patch. Seems like it might just be simpler to have the qemu block ABI use bytes rather than blocks. Maybe with some common helper functions for doing R/M/W on hard sectored devices. By adding variable sized sectors you're just shifting complexity from the block backends to the device emulation. Paul