From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LruKu-0007v7-9Y for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:30:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LruKp-0007uO-RA for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:30:31 -0400 Received: from [199.232.76.173] (port=58868 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LruKp-0007uJ-MP for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:30:27 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:20362) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LruKp-0007XU-1l for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:30:27 -0400 Received: from [10.80.225.184] ([10.80.225.184]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id n39DUPr4002045 for ; Thu, 9 Apr 2009 06:30:25 -0700 Message-ID: <49DDF882.2050308@eu.citrix.com> Date: Thu, 09 Apr 2009 14:30:42 +0100 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] buffer alignment for block backends References: <49DCA80A.1020808@eu.citrix.com> <49DCF2C0.9070704@codemonkey.ws> <49DDC8E0.50900@eu.citrix.com> <20090409131951.GA17258@lst.de> In-Reply-To: <20090409131951.GA17258@lst.de> Content-Type: text/plain; charset=UTF-8 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" Christoph Hellwig wrote: > On Thu, Apr 09, 2009 at 11:07:28AM +0100, Stefano Stabellini wrote: >> + acb->bounce = qemu_blockalign(qiov->size); > > Why don't you pass a BlockDriverState to it so that it automatically > does the best alignment for the underlying driver? > This is a good idea. What if I add a new field to BlockDriverState called 'alignment' defaulted to 512?