From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1cov-00079Y-T0 for qemu-devel@nongnu.org; Thu, 18 Dec 2014 10:17:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1cop-00031s-Lu for qemu-devel@nongnu.org; Thu, 18 Dec 2014 10:16:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1cop-00031P-EP for qemu-devel@nongnu.org; Thu, 18 Dec 2014 10:16:47 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBIFGjfd001569 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 18 Dec 2014 10:16:45 -0500 Date: Thu, 18 Dec 2014 16:16:43 +0100 From: Kevin Wolf Message-ID: <20141218151643.GD25902@noname.redhat.com> References: <1418304053-15140-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1418304053-15140-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH 00/14] block: Remove "growable", add blk_new_open() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , Markus Armbruster Am 11.12.2014 um 14:20 hat Max Reitz geschrieben: > This series removes the "growable" field from the BlockDriverState > object. Its use was to clamp guest requests against the limits of the > BDS; however, this can now be done more easily by moving those checks > into the BlockBackend functions. > > In a future series, "growable" may be reintroduced (maybe with a > different name); it will then signify whether a BDS is able to grow (in > contrast to the current "growable", which signifies whether it is > allowed to). Maybe I will add it to the BlockDriver instead of the BDS, > though. > > To be able to remove that field, qemu-io needs to be converted to > BlockBackend, which is done by this series as well. While working on > that I decided to convert blk_new_with_bs()+bdrv_open() to > blk_new_open(). I was skeptical about that decision at first, but it > seems good now that I was able to replace nearly every blk_new_with_bs() > call by blk_new_open(). In a future series I may try to convert some > remaining bdrv_open() calls to blk_new_open() as well. > > Finally, the question needs to be asked: If, after this series, every > BDS is allowed to grow, are there any users which do not use BB, but > should still be disallowed from reading/writing beyond a BDS's limits? > The only users I could see were the block jobs. Some of them should > indeed be converted to BB; but none of them takes a user-supplied offset > or size, all work on the full BDS (or only on parts which have been > modified, etc.). Therefore, it is by design impossible for them to > exceed the BDS's limits, which makes making all BDS's growable safe. > > > This series depends on "[PATCH v3 0/3] iotests: Fix test 039". I'm afraid this series needs rebasing. Kevin