From patchwork Tue Jan 16 13:04:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10166813 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 45E3D60325 for ; Tue, 16 Jan 2018 13:06:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3906028446 for ; Tue, 16 Jan 2018 13:06:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DA0E28474; Tue, 16 Jan 2018 13:06:52 +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=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 C222028446 for ; Tue, 16 Jan 2018 13:06:51 +0000 (UTC) Received: from localhost ([::1]:35113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebQx0-00042W-Vp for patchwork-qemu-devel@patchwork.kernel.org; Tue, 16 Jan 2018 08:06:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebQvJ-0002cI-G3 for qemu-devel@nongnu.org; Tue, 16 Jan 2018 08:05:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebQvF-0006SU-99 for qemu-devel@nongnu.org; Tue, 16 Jan 2018 08:05:05 -0500 Received: from mail-ve1eur01on0113.outbound.protection.outlook.com ([104.47.1.113]:61824 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 ) id 1ebQvF-0006R7-2g; Tue, 16 Jan 2018 08:05:01 -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; bh=G4LG5MlrMqP819rLlJ1ysv6IMR6RTYB2P+hO7kJUPgY=; b=X7T+UoVhTzMceWWmuXXLl60AIPUmcdKO5YUOHIFcawubOOPduHmqSovVa0ZMqm/cld3qy8ZbztyrhSLQhJGsxRtzGtfhtVw9myR2aNC+qberwwBd0zE2LRuXqPFza//De5dM556+0XpMswAHkusBnpZxCnrQPUqLVTUYZOaPHik= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by VI1PR0801MB2000.eurprd08.prod.outlook.com (2603:10a6:800:8a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 13:04:59 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Tue, 16 Jan 2018 16:04:23 +0300 Message-Id: <1516107870-8110-3-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516107870-8110-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1516107870-8110-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1P190CA0006.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:bc::16) To VI1PR0801MB2000.eurprd08.prod.outlook.com (2603:10a6:800:8a::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5e40daa4-7876-4b40-bfd6-08d55ce1c014 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:VI1PR0801MB2000; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB2000; 3:b8eio2Ke/HLIasu/zw+WCaB8CxY8V2QryKFY07PgWH4HjsyvjZ2AgFIfiUPsXf9bDgv1ywyjP6t+QLB+yzc1hV5zgnt0hEgywiE3KddXctQqdNamd9CDKNDVcUs5Eb0O4sBj4o5XtRuHcMgtoFu7hXfkcLmzVeVADc6TQJQp855VxVGu16q/uQKvZDlGwntFjI1c0bbgG9daOZb4IzrEJb7VJNbEtAyXHLlkREBpjLZFhwxHDtYz7khSlXBTp5Kn; 25:qzra/i8P+w1tRM0Cge9EO04t8IF5Nb1tge0ysSV1ZfaJwqR+0Bo94EqZdnTeuxbOBX9r/hNeGloSc6iLxmw0RcO3GNNmGFN5BPVaORmWGSsWuKyLE3/AKMPaSZkS74MD0y6whdrGWdGa2PlEra5tLoZJqIRV5htYSorhSg11HlH3O7T7ewcvuuLSzZ7bEuOwN0NrjGFg/wEWMBHKG/I9UVBB7ryC3twBC4LRRMFafRoMTFzpIBp2mS2yMmjT+fbaCvtAUWWLSyiYq0Ix5Ocfp5tnu1wQNeVaXs1TfPj9l0sXzccIESk9P9+cnOWGLaagODkIX1PE1B5wS7Mnek7o6Q==; 31:sh/EGvwbMUIjkWBQrmXOgtpfvrR/SJi9HTphAj49GatQv1fKbUKmF5oKVmTwtlDSKpcF5FU5wj3EimIMevUWbIcTB/25si0HStDgnlA69N7msWblL1TskVHMxEtN1Gr1CMGFm0bRx1MVXKKbc0Jc08labIBiwslmIPn607A102UyrJAtPHMc6cf8ZW65kCRHzFtqMbWEwFG4o4rtXPU7EHdeP7+jwB4uncsvf2zltGU= X-MS-TrafficTypeDiagnostic: VI1PR0801MB2000: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB2000; 20:iDhRrNYOzJ76TLkHJIheIxc5OYvhhLg41ylaIypAxwGR58o/i0u5D2dbTWI7B3SgYzlw/F4OQtcZjx5/18r3ZGWOMZZqoIDB74mK4cMiS2gHJQFmI+vWni6f4hpOvjwb9btMouWVu9wFN2JfkdK44vyyHykfvbU4PAWdgW9m++zzE/roTC1n2tbvfJ3HAqjBf0TRTLBZgDN64Kydmxu64y2xhRMLxDJSVdMWwdhu1rH6hGhlctuV1NiAtS5NqPIdNGhRHYccvum+BEuZlLedwpZsHOJGjphCiJIRwiRkAX12A5XFSlLEcrlrUQ+7GGs8199fTt2MkVn3qHwZVY9kJdAzcjuTiN4mC4zl1mELKQ0YAK8tgVmqz+SVWhVM+771IERGknqeHs2tHtzztI0cYdsV8NctR07dLiuV8ePAgXs=; 4:oODyTIPXWvbOxgyA/k5zgr96LNBZTrvOTROu1FBkUem1WMQ7bJkB6xlUyODuekSdIBahMFpaw5POzf81yEFdJqpJYAu7cFj529qx6Br6eIPDQQLxYSX+UDpIu5IR9KLx4lpc+eSMEqnC/CPMttDe3tgsnhqVYlcGsY5UDMk43xY4JLMtFinSbWulUKW12pq02DwaKgkyaZCBbI/M6BpuCnkrP3YeiAzp+K2eR/WeYp8VZNtESjKef7c/kXyHYeugxLYczZYpA/7IrGYZurdSOw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231023)(944501161)(10201501046)(6041268)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR0801MB2000; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR0801MB2000; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(396003)(366004)(39380400002)(376002)(39840400004)(189003)(199004)(105586002)(2906002)(48376002)(6916009)(2950100002)(5660300001)(53416004)(66066001)(6512007)(53936002)(26005)(50466002)(47776003)(16526018)(6666003)(2351001)(478600001)(36756003)(106356001)(2361001)(69596002)(51416003)(305945005)(68736007)(4326008)(8936002)(81166006)(386003)(52116002)(3846002)(25786009)(8676002)(81156014)(6486002)(50226002)(76176011)(6116002)(6506007)(97736004)(316002)(16586007)(86362001)(107886003)(7736002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB2000; H:xantnef-ws.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB2000; 23:0ICSbSn+3/ZjTOkr6dZRjv3b7xab9N+20TuP8ZH?= =?us-ascii?Q?26RS8WH2/78rSHnZr7pQjeSyaQhUc5ILqKdRNMKwf0MLqmeVddSp0aZz4I3a?= =?us-ascii?Q?eUXjS5byJb4idDMESfeyfKUQGGeXxTROly5vCCrpaCDPYHq4MAe0W0V2Tnm5?= =?us-ascii?Q?jhLtSN/AhEQI7JC+0BSzejLZa9INMDWJDe8TyQKckFJqaUuxb0c4BP0JSt43?= =?us-ascii?Q?iU08NbwHcFmofENnzywkZGiOQrGGY1XwNYTnzxybaXT0y+4drxuvgJLifzMB?= =?us-ascii?Q?+IElyD73q3n7wvu1ke+3yGZqqEx96b4H/TlK1YWysSNhbVJN0cNQegJmVHjk?= =?us-ascii?Q?6WWRLn2rbtL+ThkjWrvAM6AANGyyTIZWn4Ef4AzVnfYwDk8TgBKpqahMkIR9?= =?us-ascii?Q?+TtMdoQgTSVPbvEnzHw99Hsu1EEc2q2j1cFl1cmsg+4FZxZNw+g9SVjYKACj?= =?us-ascii?Q?N1Jkdi9ZWpKBwrbcKqssPv04hobAMAsrltMheQJ6n80mzDPK+Nq5A+V2zImW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zUGm6EmG4OrEV+n7a72DSU0meZk9clmhlFnRPBS6Sqyk2J8cTtQ/2Vblhari6yV+ukWhDCt/a98r45q61dG6P4NPlO4y+uWiUBy/VGycAKcyLyyjqIL5DXekrlW9Eiy1wtqXFGTD/gYwo958AveXKFZk++oLrw1TnC3ULd/HY=; 5:3AQFiRkyTYmRtgTuin24GeBsW2Hgofr0bu7u7Wndaph/BvBYo95r6O1zHVDSLaQhK1evuhl6UlXZdgVUipTwtu3NDFlVMDLX6+p8upN7NWFfaVZLsI0yQvj6FJ19Zc7EwkaE97gSRxqyog/Z7PGh0bui5PUkn3NSHRg4EE8FehY=; 24:HhIEvn2h2pJz9cmwTvgPHppjfTJVnGeEDgOHsdVDiHVgKoZfK8AT4UyEVJ8VkQKjBzOmyqJsVVUr1JqTXgB95Pl+fRN82Y6sZg8ZL7403Xo=; 7:RxWTMQqGLbLRaoBXQLMm/BKwCXMwZ+fP5A2MbC+trKHDIPRUDusqSCGQMyEPPOT2n5c91nfjdES4+mCfRccTbN5CiHiUNCzFW8FpEjkCRSBEj3zeYjXh1NIsVmZgOX8xa1wzWEIQFhNVA8fhWrMBEd/ikjeNJG+dcef2mIpheygaWzuudhXpZ0+/5vq8ILR2hPOUR72/jDPc9r52mCSCFaKnRWr20fxxiamMGG3PkH+tPBuEfxsrx0kCnjd013Et SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB2000; 20:bBB/WvKsP+UvCkNBCfY6RwE+5USEtZBwxv5YljFMFKvhUhgd2ms5ZHZDbRAZmntK8yG8qzkV6qExgsx3PB21yrO0d81Uj+uqqHqNSLHbww+7Y7RQJpFgETX1u+r1MCLY/j6rEBwWq7Fnzvb0OSg66LOJuY6lzwr/xDJjYq+nDCA= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 13:04:59.5587 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5e40daa4-7876-4b40-bfd6-08d55ce1c014 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2000 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.1.113 Subject: [Qemu-devel] [PATCH v6 2/9] blkverify: set supported write/zero flags X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, Anton Nefedov , berto@igalia.com, den@virtuozzo.com, qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- block/blkverify.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/block/blkverify.c b/block/blkverify.c index 06369f9..9ba65d0 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -140,6 +140,15 @@ static int blkverify_open(BlockDriverState *bs, QDict *options, int flags, goto fail; } + bs->supported_write_flags = BDRV_REQ_FUA & + bs->file->bs->supported_write_flags & + s->test_file->bs->supported_write_flags; + + bs->supported_zero_flags = + (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) & + bs->file->bs->supported_zero_flags & + s->test_file->bs->supported_zero_flags; + ret = 0; fail: qemu_opts_del(opts);