From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrXvn-0002N8-Bq for qemu-devel@nongnu.org; Wed, 08 Apr 2009 09:35:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrXvi-0002LP-GP for qemu-devel@nongnu.org; Wed, 08 Apr 2009 09:35:06 -0400 Received: from [199.232.76.173] (port=53452 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrXvh-0002LG-6q for qemu-devel@nongnu.org; Wed, 08 Apr 2009 09:35:01 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:48458) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LrXvg-0006K8-Si for qemu-devel@nongnu.org; Wed, 08 Apr 2009 09:35:01 -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 n38DYst1030834 for ; Wed, 8 Apr 2009 06:34:55 -0700 Message-ID: <49DCA80A.1020808@eu.citrix.com> Date: Wed, 08 Apr 2009 14:35:06 +0100 From: Stefano Stabellini MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] buffer alignment for block backends 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" Hi all, I am having an issue with the alignment of the buffers given to the block backends. In particular, at the moment we are allocating buffers 512 bytes aligned while the backend I am working on (block-vbd) needs page alignment. Given that the 512 bytes alignment comes already from the requirements of a "special case" (linux O_DIRECT, I guess), would you be willing to make another exception for another special case and page align the buffers? If you do not want to do that, another possible solution is to create a new function called "qemu_blockalign" that would be implemented as qemu_memalign(512, size); so we don't have to write 512 bytes everywhere but only in one place, thus making life easier to people like me that have to change the value for a special case. Thanks in advance for your sympathy :) Stefano Stabellini