From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCQOZ-0005Dm-4Z for qemu-devel@nongnu.org; Fri, 14 Sep 2012 03:33:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCQOW-0000cD-U1 for qemu-devel@nongnu.org; Fri, 14 Sep 2012 03:32:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCQOW-0000c7-Ll for qemu-devel@nongnu.org; Fri, 14 Sep 2012 03:32:56 -0400 Message-ID: <5052DDA0.6070600@redhat.com> Date: Fri, 14 Sep 2012 09:32:48 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <6316cedacd954f8106aca8a45618088e24c4a757.1347548248.git.jcody@redhat.com> <50520394.9030100@redhat.com> <50521070.5020302@redhat.com> In-Reply-To: <50521070.5020302@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: jcody@redhat.com Cc: stefanha@gmail.com, Paolo Bonzini , eblake@redhat.com, qemu-devel@nongnu.org, supriyak@linux.vnet.ibm.com Am 13.09.2012 18:57, schrieb Jeff Cody: > On 09/13/2012 12:02 PM, Paolo Bonzini wrote: >> 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 >> > > Hmm - yes, it looks like that is so. This patch will transform into > checking for BDRV_O_NOCACHE as you suggest, and killing aligned_buf. Sounds good, but please make removing aligned_buf a separate patch. Kevin