From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtcfQ-0000E0-2V for qemu-devel@nongnu.org; Fri, 02 Oct 2009 03:35:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtcfL-00008Z-4B for qemu-devel@nongnu.org; Fri, 02 Oct 2009 03:35:03 -0400 Received: from [199.232.76.173] (port=46281 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtcfL-00008T-0i for qemu-devel@nongnu.org; Fri, 02 Oct 2009 03:34:59 -0400 Received: from mx20.gnu.org ([199.232.41.8]:42007) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MtcfK-0000rM-6k for qemu-devel@nongnu.org; Fri, 02 Oct 2009 03:34:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtcfJ-0003Ui-Hq for qemu-devel@nongnu.org; Fri, 02 Oct 2009 03:34:57 -0400 Message-ID: <4AC5ACDA.3060309@redhat.com> Date: Fri, 02 Oct 2009 09:33:46 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] block/raw: Add create_options for host_device References: <1254393349-7557-1-git-send-email-kwolf@redhat.com> <20091001171353.GA19616@lst.de> In-Reply-To: <20091001171353.GA19616@lst.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org Am 01.10.2009 19:13, schrieb Christoph Hellwig: > On Thu, Oct 01, 2009 at 12:35:49PM +0200, Kevin Wolf wrote: >> Today host_devices have a create function, so they also need a create_options >> field to prevent qemu-img from complaining. > > Yeah. But looking deeper does the size argument actually make any > sense for the host devices? What we do right now is to seek to the > total_size * 512 as some sort of tests, but it's not actually in any > way encoded in the image, we'll always get the normal raw_getlength > return value when quering for the size later. Well, I do think that it makes sense to check if the device is at least not too small for the data that we are going to write (we could also check if it's an exact match, but I'm not sure if this is helpful). But other than this there is probably little use for it, yes. What would you suggest? Drop the check completely and change qemu-img to deal with formats that don't support sizes? Kevin