Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LmzY2-0001VD-Aq for qemu-devel@nongnu.org; Thu, 26 Mar 2009 20:03:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LmzXx-0001P8-Ad for qemu-devel@nongnu.org; Thu, 26 Mar 2009 20:03:45 -0400 Received: from [199.232.76.173] (port=53790 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LmzXx-0001Ox-6e for qemu-devel@nongnu.org; Thu, 26 Mar 2009 20:03:41 -0400 Received: from phong.sigbus.net ([65.49.35.42]:54827) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LmzXw-0000ZD-Mp for qemu-devel@nongnu.org; Thu, 26 Mar 2009 20:03:40 -0400 Received: from [192.168.0.3] (c-71-202-202-194.hsd1.ca.comcast.net [71.202.202.194]) by phong.sigbus.net (Postfix) with ESMTPSA id AC73095C0B8 for ; Thu, 26 Mar 2009 17:03:37 -0700 (PDT) Subject: Re: [Qemu-devel] [PATCH] add bdrv->create function for host_device From: Nolan In-Reply-To: 49CB7EED.7070706@us.ibm.com Content-Type: text/plain Date: Thu, 26 Mar 2009 17:03:36 -0700 Message-Id: <1238112216.15350.235.camel@voxel> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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" Anthony Liguori writes: > I'm not quite sure how, but I think you need to have BDRV_O_FILE as a > special case. I think probably the easiest thing to do is to bail > out if BDRV_O_FILE is set since a physical device cannot be growable. If I understand you correctly, my original patch already does that: if (flags || backing_file) return -ENOTSUP; Though I can't say that I'm entirely sure I understand what it means to pass BDRV_O_FILE to bdrv_create(). The consensus of other block_*.c implementations is to ignore flags completely or bail if flags != 0, unless they have their own bdrv specific flags (eg BLOCK_FLAG_COMPAT6 for vmdk, and BLOCK_FLAG_ENCRYPT for qcow/qcow2) which they specifically honor and ignore any other flags.