Message ID | 20190114111744.113188-2-anton.nefedov@virtuozzo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 100556C2 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 14 Jan 2019 11:21:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0175328AF6 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 14 Jan 2019 11:21:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3C9928B7F; Mon, 14 Jan 2019 11:21:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8B7F828B83 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 14 Jan 2019 11:21:10 +0000 (UTC) Received: from localhost ([127.0.0.1]:49313 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1gj0Ik-0002UT-Qw for patchwork-qemu-devel@patchwork.kernel.org; Mon, 14 Jan 2019 06:21:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <anton.nefedov@virtuozzo.com>) id 1gj0Gc-0000W3-QF for qemu-devel@nongnu.org; Mon, 14 Jan 2019 06:18:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <anton.nefedov@virtuozzo.com>) id 1gj0GZ-00019g-RM for qemu-devel@nongnu.org; Mon, 14 Jan 2019 06:18:54 -0500 Received: from mail-am5eur02on0707.outbound.protection.outlook.com ([2a01:111:f400:fe07::707]:30621 helo=EUR02-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <anton.nefedov@virtuozzo.com>) id 1gj0GZ-0000Wf-9N; Mon, 14 Jan 2019 06:18:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BTwew+tpnIJT875hqsQc3D2ZZHkxS9GE2m9B/hbgqzw=; b=MshcWBmUHuL1mnVhAo9rIpsUeI5K1ws8p4ref8ksu2K/Njvv0hvagXOdcbXwbgqTp/ZDWjoiw7DPNpnNvJcuMMwxhBp6bqYN1+5QDMJ6jBxxS47J5VmngQykgmchdAdw1YbLJSx6tSUn3YI7Jbgjcn70dzLASMuLBoCGOllQnug= Received: from AM0PR08MB4292.eurprd08.prod.outlook.com (20.179.33.17) by AM0PR08MB2977.eurprd08.prod.outlook.com (52.134.92.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.14; Mon, 14 Jan 2019 11:18:23 +0000 Received: from AM0PR08MB4292.eurprd08.prod.outlook.com ([fe80::d13a:1305:bb54:1916]) by AM0PR08MB4292.eurprd08.prod.outlook.com ([fe80::d13a:1305:bb54:1916%6]) with mapi id 15.20.1516.019; Mon, 14 Jan 2019 11:18:23 +0000 From: Anton Nefedov <anton.nefedov@virtuozzo.com> To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org> Thread-Topic: [PATCH v12 01/10] mirror: inherit supported write/zero flags Thread-Index: AQHUq/rcpoByAgczjUS++QuUBnjmgw== Date: Mon, 14 Jan 2019 11:18:23 +0000 Message-ID: <20190114111744.113188-2-anton.nefedov@virtuozzo.com> References: <20190114111744.113188-1-anton.nefedov@virtuozzo.com> In-Reply-To: <20190114111744.113188-1-anton.nefedov@virtuozzo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0701CA0065.eurprd07.prod.outlook.com (2603:10a6:3:9e::33) To AM0PR08MB4292.eurprd08.prod.outlook.com (2603:10a6:208:13b::17) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [185.231.240.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR08MB2977; 20:5Io/Ajuq7XAKZhf/iQ2GfcfNT8xxjAgaWK7OCYJeGr13KcaN0C4GMdTS/vnf39dbr4bhpLGGrM2AcDesA+KVtrR5DnBoj/AKmJPVmigzdCDoM91ek0guKm3penxUWExG7omERoXA5/NNoXbtYzKAzCWE/7fAFKZv7DuEFs7h9oo= x-ms-office365-filtering-correlation-id: fdc45586-520d-4958-c5f9-08d67a11fed8 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB2977; x-ms-traffictypediagnostic: AM0PR08MB2977: x-microsoft-antispam-prvs: <AM0PR08MB2977B845CE8426F2090B57A8F8800@AM0PR08MB2977.eurprd08.prod.outlook.com> x-forefront-prvs: 0917DFAC67 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39840400004)(396003)(136003)(366004)(346002)(376002)(199004)(189003)(6346003)(256004)(14454004)(5640700003)(6486002)(6916009)(8936002)(1076003)(36756003)(97736004)(53936002)(305945005)(476003)(107886003)(478600001)(186003)(2906002)(486006)(6116002)(50226002)(3846002)(26005)(2501003)(2616005)(99286004)(8676002)(11346002)(66066001)(4326008)(5660300001)(52116002)(71200400001)(81156014)(25786009)(81166006)(71190400001)(76176011)(2351001)(7736002)(316002)(105586002)(106356001)(68736007)(102836004)(44832011)(6436002)(446003)(54906003)(6512007)(575784001)(86362001)(6506007)(386003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR08MB2977; H:AM0PR08MB4292.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: NpCmB7twqGA5sLf7ZCQY7qr1AXcqyGcdXhkJAATEKjFNb2JLEBf7pdKuhOJqM7DzOHvZQmRFl1Ib/3j7pvxpo20SyJu7ccy6ekbeU7Q5gXhNG4uuAHNzhgJGxg44S2sOqsC/lEwpNNe0erMIiR4HTXSoY1NcmEIWA4fusNXlvywpq1IDQ8FjMploY1pRl6FnxSvyvY3RN+msfOGovN4lQWg2jL+zJPWVTM++1+SS22BD53YoqoBl+xbfg4IxRmScRJBGQZ5Rhh2pnSuwpD89QMSvPK4pc5pQ7VmHE34CmLoRj3o1sBwhEuD/FXJe286ixvnc28pA0cN+i2cnm+zw3Ykx2q/51PI6R0qWGsekSuVwQ87ntJW78RrqveLd7f3cJYoS1py9zXtsnCAIZnTKeqNV+n8i/I1nh7/R9tst+6c= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdc45586-520d-4958-c5f9-08d67a11fed8 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jan 2019 11:18:22.2291 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB2977 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe07::707 Subject: [Qemu-devel] [PATCH v12 01/10] mirror: inherit supported write/zero flags X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: "kwolf@redhat.com" <kwolf@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>, "berto@igalia.com" <berto@igalia.com>, Denis Lunev <den@virtuozzo.com>, "qemu-block@nongnu.org" <qemu-block@nongnu.org>, "mreitz@redhat.com" <mreitz@redhat.com>, Anton Nefedov <anton.nefedov@virtuozzo.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
qcow2: cluster space preallocation
|
expand
|
diff --git a/block/mirror.c b/block/mirror.c index f0b211a9c8..7b5a5f13a2 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1529,8 +1529,12 @@ static void mirror_start_job(const char *job_id, BlockDriverState *bs, mirror_top_bs->implicit = true; } mirror_top_bs->total_sectors = bs->total_sectors; - mirror_top_bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED; - mirror_top_bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED; + mirror_top_bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED | + (BDRV_REQ_FUA & bs->supported_write_flags); + mirror_top_bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED | + ((BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) + & bs->supported_zero_flags); + bs_opaque = g_new0(MirrorBDSOpaque, 1); mirror_top_bs->opaque = bs_opaque; bdrv_set_aio_context(mirror_top_bs, bdrv_get_aio_context(bs));