From patchwork Tue Jun 5 22:04:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 163183 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8A3CFB6F9F for ; Wed, 6 Jun 2012 08:05:38 +1000 (EST) Received: from localhost ([::1]:55786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc1sd-0004bB-UD for incoming@patchwork.ozlabs.org; Tue, 05 Jun 2012 18:05:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc1sJ-0004QH-PM for qemu-devel@nongnu.org; Tue, 05 Jun 2012 18:05:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sc1sH-00015A-Q5 for qemu-devel@nongnu.org; Tue, 05 Jun 2012 18:05:15 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:40874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc1sH-0000zZ-IP for qemu-devel@nongnu.org; Tue, 05 Jun 2012 18:05:13 -0400 Received: by mail-pb0-f45.google.com with SMTP id ro12so8716928pbb.4 for ; Tue, 05 Jun 2012 15:05:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=g0SDOs/TGgQLcUqMb6O3uPBWuQjbA5BM8DT8j3CtzpA=; b=xkEceHbgrzYBRjDk5cRx/D7NrgqCoUpAKlkdj0YGQQ47JFg0LZdFnxZLbBr8TCbLV4 m9luzT+neUiUhfTrzMECkBwNRd1OFEP4fzgiB7nncVMziJYWnXt38X4Qg1pUtPkr4bqN BLaen9gjUUy9rA383vuVXD6X6k6X8YLn2B/s03ytgEweMsrs+ojgIXu+hSk0jt+3EYkk 2cH46Oa8R0ivhEdIdwiwlKW8kGgJkTDm9og3OdL2fmTRIxYDl+FGUgm/gmdluc5BSdGy uftRUUhjzGYCKLW7fbYQ5qg+EIt5AVlQRuER7HE6pGDDO61uvZiu9r3gwxAD2kynMC4T ViCA== Received: by 10.68.233.193 with SMTP id ty1mr51745608pbc.47.1338933912748; Tue, 05 Jun 2012 15:05:12 -0700 (PDT) Received: from yakj.usersys.redhat.com (222-151-096-013.jp.fiberbit.net. [222.151.96.13]) by mx.google.com with ESMTPS id ok6sm108065pbb.29.2012.06.05.15.05.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 15:05:11 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 6 Jun 2012 00:04:51 +0200 Message-Id: <1338933895-20677-4-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.10.1 In-Reply-To: <1338933895-20677-1-git-send-email-pbonzini@redhat.com> References: <1338933895-20677-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: kwolf@redhat.com Subject: [Qemu-devel] [PATCH v3 3/7] block: copy enable_write_cache in bdrv_append X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Because the guest will be able to flip enable_write_cache, the actual state may not match what is used to open the new snapshot. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block.c b/block.c index 7538112..9bff401 100644 --- a/block.c +++ b/block.c @@ -1000,6 +1000,8 @@ void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top) tmp.buffer_alignment = bs_top->buffer_alignment; tmp.copy_on_read = bs_top->copy_on_read; + tmp.enable_write_cache = bs_top->enable_write_cache; + /* i/o timing parameters */ tmp.slice_time = bs_top->slice_time; tmp.slice_start = bs_top->slice_start;