From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewJpZ-0006rH-BJ for qemu-devel@nongnu.org; Wed, 14 Mar 2018 23:45:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewJpY-0003ao-E9 for qemu-devel@nongnu.org; Wed, 14 Mar 2018 23:45:29 -0400 From: Fam Zheng Date: Thu, 15 Mar 2018 11:45:07 +0800 Message-Id: <20180315034507.6341-1-famz@redhat.com> Subject: [Qemu-devel] [PATCH] vvfat: Fix inherit_options flags List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Max Reitz , stefanha@redhat.com Overriding flags violates the precedence rules of bdrv_reopen_queue_child. Just like the read-only option, no-flush should be put into the options. The same is done in bdrv_temp_snapshot_options. Reported-by: Stefan Hajnoczi --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vvfat.c b/block/vvfat.c index 4a17a49e12..1569783b0f 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -3129,7 +3129,7 @@ static void vvfat_qcow_options(int *child_flags, QDict *child_options, int parent_flags, QDict *parent_options) { qdict_set_default_str(child_options, BDRV_OPT_READ_ONLY, "off"); - *child_flags = BDRV_O_NO_FLUSH; + qdict_set_default_str(child_options, BDRV_OPT_CACHE_NO_FLUSH, "on"); } static const BdrvChildRole child_vvfat_qcow = { -- 2.14.3