From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCBst-0004aL-Vk for qemu-devel@nongnu.org; Thu, 13 Sep 2012 12:03:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCBst-0002Qj-0d for qemu-devel@nongnu.org; Thu, 13 Sep 2012 12:03:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCBss-0002QQ-Nn for qemu-devel@nongnu.org; Thu, 13 Sep 2012 12:03:18 -0400 Message-ID: <50520394.9030100@redhat.com> Date: Thu, 13 Sep 2012 18:02:28 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <6316cedacd954f8106aca8a45618088e24c4a757.1347548248.git.jcody@redhat.com> In-Reply-To: <6316cedacd954f8106aca8a45618088e24c4a757.1347548248.git.jcody@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, supriyak@linux.vnet.ibm.com, eblake@redhat.com, qemu-devel@nongnu.org, stefanha@gmail.com Il 13/09/2012 17:49, Jeff Cody ha scritto: > + > + /* > + * If we didn't have BDRV_O_NOCACHE set before, we may not have allocated > + * aligned_buf > + */ > + ret = raw_allocate_aligned_buf(&raw_s->aligned_buf, > + &raw_s->aligned_buf_size, state->flags); Aligned_buf is unused, except for checking if it exists here: if (s->aligned_buf) { if (!qiov_is_aligned(bs, qiov)) { type |= QEMU_AIO_MISALIGNED; #ifdef CONFIG_LINUX_AIO } else if (s->use_aio) { return laio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov, nb_sectors, cb, opaque, type); #endif } } You can instead check BDRV_O_NOCACHE and kill aligned_buf completely. Paolo