From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STvtL-0006Vv-0o for qemu-devel@nongnu.org; Mon, 14 May 2012 10:04:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STvtF-00043B-VW for qemu-devel@nongnu.org; Mon, 14 May 2012 10:04:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STvtF-00042t-NK for qemu-devel@nongnu.org; Mon, 14 May 2012 10:04:45 -0400 Message-ID: <4FB110E1.90103@redhat.com> Date: Mon, 14 May 2012 16:04:17 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1337003481-30215-1-git-send-email-zwu.kernel@gmail.com> In-Reply-To: <1337003481-30215-1-git-send-email-zwu.kernel@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qcow2: adjust qcow2_co_flush_to_os -> qcow2_co_flush_to_disk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zwu.kernel@gmail.com Cc: pbonzini@redhat.com, wuzhy@linux.vnet.ibm.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 14.05.2012 15:51, schrieb zwu.kernel@gmail.com: > From: Zhi Yong Wu > > qcow2_co_flush_to_os() actually flush all cached data to the disk. To keep its name consistent with its actual function, adjust its name accordingly. > > Signed-off-by: Zhi Yong Wu This patch is plain wrong. You're aware that you're not changing a name, but functionality here? Have a look at block_int.h for the semantics of each function: /* * Flushes all data that was already written to the OS all the way down to * the disk (for example raw-posix calls fsync()). */ int coroutine_fn (*bdrv_co_flush_to_disk)(BlockDriverState *bs); /* * Flushes all internal caches to the OS. The data may still sit in a * writeback cache of the host OS, but it will survive a crash of the qemu * process. */ int coroutine_fn (*bdrv_co_flush_to_os)(BlockDriverState *bs); Apart from that, it's not even intentional that qcow2 does a bdrv_flush() even if it didn't write out any cache entries. If we optimise the cache code a bit, this might disappear in the future. Kevin