Message ID | 20181218075707.12006-3-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 BCB746C2 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 18 Dec 2018 08:02:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A80F42A592 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 18 Dec 2018 08:02:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BD012A626; Tue, 18 Dec 2018 08:02:08 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2A5412A592 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 18 Dec 2018 08:02:07 +0000 (UTC) Received: from localhost ([::1]:52368 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 1gZAKH-0000lZ-TE for patchwork-qemu-devel@patchwork.kernel.org; Tue, 18 Dec 2018 03:02:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <anton.nefedov@virtuozzo.com>) id 1gZAG0-0006Ih-Hk for qemu-devel@nongnu.org; Tue, 18 Dec 2018 02:57:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <anton.nefedov@virtuozzo.com>) id 1gZAFz-0003Y0-6A for qemu-devel@nongnu.org; Tue, 18 Dec 2018 02:57:36 -0500 Received: from mail-ve1eur01on0731.outbound.protection.outlook.com ([2a01:111:f400:fe1f::731]:21220 helo=EUR01-VE1-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 1gZAFy-0003Wv-Nz; Tue, 18 Dec 2018 02:57:34 -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=YtKU7MAoZBfWpZzj3rR0JS/qAwrC+66+wyvLlMIdQIk=; b=RFWY/+dCz/hqSOpXJ45kUt8gaob57vl2ru83lxNyUqCL5N+rOmqwM5LMbbKLnp7PYMI7JWfTo6TWd21TuNbQaB0toKsKXes1/TxC2Ahq+xPT8CbYWJhfYaayUNzIDOIvLMHp4BjM8TxgQifzwC/d5N8r+eiHxfO1qsPFloMKMkY= Received: from AM0PR08MB3347.eurprd08.prod.outlook.com (52.134.94.148) by AM0PR08MB4419.eurprd08.prod.outlook.com (20.179.34.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1425.22; Tue, 18 Dec 2018 07:57:32 +0000 Received: from AM0PR08MB3347.eurprd08.prod.outlook.com ([fe80::cceb:42e9:4742:393]) by AM0PR08MB3347.eurprd08.prod.outlook.com ([fe80::cceb:42e9:4742:393%2]) with mapi id 15.20.1425.023; Tue, 18 Dec 2018 07:57:32 +0000 From: Anton Nefedov <anton.nefedov@virtuozzo.com> To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org> Thread-Topic: [PATCH v11 02/10] blkverify: set supported write/zero flags Thread-Index: AQHUlqdUL2Hr50GQwU2C89T+Wwyhaw== Date: Tue, 18 Dec 2018 07:57:32 +0000 Message-ID: <20181218075707.12006-3-anton.nefedov@virtuozzo.com> References: <20181218075707.12006-1-anton.nefedov@virtuozzo.com> In-Reply-To: <20181218075707.12006-1-anton.nefedov@virtuozzo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P191CA0007.EURP191.PROD.OUTLOOK.COM (2603:10a6:3:cf::17) To AM0PR08MB3347.eurprd08.prod.outlook.com (2603:10a6:208:5f::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [185.231.240.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR08MB4419; 20:uu/lxXERrVnKLRqMFVdM9J9Wey97BRDGcoP4MEYWjemkkzW30ZnEm3mk3FhhEfBBedLq1N5ECUOB26qisqRiAeFWtNHzbA3AekNVtlCij8tLwdpxb9lZ+1LECX0IYt/H+QJnCX7/gHM6huGtt9at/bGXSG5m0znylan+mc9QmiI= x-ms-office365-filtering-correlation-id: d208b874-ab67-41c3-e3d2-08d664be770c x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB4419; x-ms-traffictypediagnostic: AM0PR08MB4419: x-microsoft-antispam-prvs: <AM0PR08MB441920439601F5D92C28E1D1F8BD0@AM0PR08MB4419.eurprd08.prod.outlook.com> x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(3230021)(999002)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231475)(944501520)(52105112)(148016)(149066)(150057)(6041310)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:AM0PR08MB4419; BCL:0; PCL:0; RULEID:; SRVR:AM0PR08MB4419; x-forefront-prvs: 08902E536D x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(396003)(39850400004)(346002)(376002)(366004)(199004)(189003)(8676002)(5660300001)(5640700003)(7736002)(8936002)(4326008)(81166006)(81156014)(14454004)(305945005)(53936002)(97736004)(106356001)(2501003)(68736007)(25786009)(2351001)(105586002)(1076003)(478600001)(386003)(6916009)(66066001)(6506007)(486006)(26005)(76176011)(71190400001)(71200400001)(6486002)(102836004)(86362001)(186003)(476003)(6512007)(99286004)(3846002)(6116002)(54906003)(2906002)(2616005)(256004)(11346002)(52116002)(107886003)(446003)(6436002)(36756003)(44832011)(316002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR08MB4419; H:AM0PR08MB3347.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) x-microsoft-antispam-message-info: yRowiAO6P5fQIXzbEjr7Vrt1rATOofD/30DbTFg73gx7Rk2y6nx2sLbKJ9qK62ny7yc4Y4t1aChOrm83Fl/VwDVNShOt5KvO1d39Yd51z84AWzzeuG7O8iSTVdnuNYqFHft7UQ0w0zbdFkNb3Ek1bhW2jHTb/ICxL1xegS4rBnmz2IQjjspaO5N5ojz02BvZsZwIAI5xQotECVZLh1D7rdmMwotkfbBnQisGFzUvdbYMXErbY+T7JpYoDtFvQxs8QYGD2NiBozhK42bhthFmqRZdOL/GqqOD7SXTy2qHL9CA2xsrVEI9Go7PBlD9tQ3h 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: d208b874-ab67-41c3-e3d2-08d664be770c X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Dec 2018 07:57:32.6682 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4419 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe1f::731 Subject: [Qemu-devel] [PATCH v11 02/10] blkverify: set 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/blkverify.c b/block/blkverify.c index 89bf4386e3..bb52596cbb 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -141,8 +141,14 @@ static int blkverify_open(BlockDriverState *bs, QDict *options, int flags, goto fail; } - bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED; - bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED; + bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED | + (BDRV_REQ_FUA & + bs->file->bs->supported_write_flags & + s->test_file->bs->supported_write_flags); + bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED | + ((BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) & + bs->file->bs->supported_zero_flags & + s->test_file->bs->supported_zero_flags); ret = 0; fail: