From patchwork Thu Jan 18 17:48:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10173759 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 C0A27603B5 for ; Thu, 18 Jan 2018 17:51:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC35D28179 for ; Thu, 18 Jan 2018 17:51:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A053728402; Thu, 18 Jan 2018 17:51:20 +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 9FB3A28179 for ; Thu, 18 Jan 2018 17:51:19 +0000 (UTC) Received: from localhost ([::1]:44486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecELO-00065X-Re for patchwork-qemu-devel@patchwork.kernel.org; Thu, 18 Jan 2018 12:51:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecEJg-0004Mh-Gj for qemu-devel@nongnu.org; Thu, 18 Jan 2018 12:49:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecEJc-0004F3-0J for qemu-devel@nongnu.org; Thu, 18 Jan 2018 12:49:32 -0500 Received: from mail-am5eur03on0716.outbound.protection.outlook.com ([2a01:111:f400:fe08::716]:42208 helo=EUR03-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 ) id 1ecEJb-0004Ce-QE; Thu, 18 Jan 2018 12:49:27 -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=dsW5Dvue9V06GEDP5Q82bTARDp3HcaDLxKkCrmvPaA0=; b=SbYvIDUDDXRQBt9Y+AP3NZ3igp0ToVtfPxJCGUEjP5zPe8v/82VBntQPCa4D6rYev0ts/FjUUboq/9hlLIckDPBoDxNuBJtiW5/beloLWiu2+kzNEFuc7GFgm39FpLus1jJdh/SoDbNLO+KUCN41I2yT5SL7MKWI6VN9st3HlWM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by HE1PR0801MB1995.eurprd08.prod.outlook.com (2603:10a6:3:50::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Thu, 18 Jan 2018 17:49:22 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Thu, 18 Jan 2018 20:48:59 +0300 Message-Id: <1516297747-107232-2-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516297747-107232-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1516297747-107232-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR05CA0132.eurprd05.prod.outlook.com (2603:10a6:7:28::19) To HE1PR0801MB1995.eurprd08.prod.outlook.com (2603:10a6:3:50::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6d186755-db9e-4c85-6b5a-08d55e9bcf00 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:HE1PR0801MB1995; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1995; 3:3LQe8emwCJ7KI/yIFyjyUMM3B+Yf6vzG/OdC3c6V7LGn0/qwApX2O5SC9JJ6YGCCgf1tRqt8f+qzFZiEmD90QpGyBUBH2Zp0+j3MV16H5mswWaKa69tBwvW40hnrmzk4s1ivFwAGovIUx6vI1dXCqJjWDWJZ4+HOZjLUc8rzONiUCdfUneduXumu6tGiLY5YgnV7zSgJf1GoaqDVa0b6vnipY9zZ5yJvoWFbvaNHDEW9pYsQLPnj9YDhiseVbp6K; 25:0ixhhsvK7i8yGAJ3j6bLT+gCDZq3MgvDuELJSz45Qeak1LiJ/gXe8FJaE4utGSxhrXs5qUGzlO7wZTv1xLPsaCHeM0plJsm1HRvQf/671nP9S1dZtirlxqY2IFVPqafMtXEzNL+RmY0Tc0DD77qujB22sZ+Nx0ZSZhVXDZiV8wS8hUQSDhOikPMIvEB0itgi3XiHPXm+EG8zerP7r579s3SJeqM9JTxfwba/VvC0tejW8BJGMvtjH9+arQoRy8seCDMRNNKas/kPPMCrqHNO/G/HDlWyZoVOanRuoosoNJx0XVt6Fqc+HPGPK2+cFP+MLrBLw+WzjgvimfYB9mjW7Q==; 31:+ySUO0f7WCQggzNgIGgRSrJqxTJ+2fK0D31aIYHLtA5ipdXnlBd/ZtKEgvStAk7GsCuxIGvT2ynHcZZF63QEwoT1BqmRz6JW4fZyud0MxBTt6Zo1GHbmD8pSCRooPDq4DT1HmzjCWEeB1EiIxP46C7mSyTu2Uaj112/iSq7YONZjFmvAg4FYszfrqXgpscVFEMg/7yDMNWr1e17y2WxgzcKxUcgjzkUPzMdmxiFHRLE= X-MS-TrafficTypeDiagnostic: HE1PR0801MB1995: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1995; 20:ljboBWx85UmsVwDRowIwGSqszGyBQwfdTQoRMat8ldUdiDXRkBS9nTmSMoZ34GyrBFJSW8oWez3OMEOQwGJfuCHQ2tPfVE5oLjmU+qVfE1v2nOzvbvdjmslf0bvjK+ZirSkI7TSy7ALLOf2xexqi1cZLWOqzX4GY0k5raxTAUqcKWTn9vyrMsxfAICoB9pQcseOAG+SDsQ4HL2TS5WyQwgiGX7AyHOlfgXkk5N27sTReD+OXYpLDS71kJABdHoH7Ikq4VTJ4AK9bX2UhtZIgx2WDt71/Fld7lo+P/mhb+iluLpY3+t7X7CEglrE+gUTdSAvcQblrF35qyY8QEvp2e9sEpnp/XN7FGVvQe381tBA/OMKy9Cojm0nIsrTbTwPwrZp4VulcYN0Qa4PH8XPCvN+JvGg2svYjEUX0h056s8k=; 4:CVaBQcU6s5ncxPFbA3hk8bh64SHr149vOJxg4/7AkXGbrprqj6AwZOXTAgHyRoarGZZt7IMdSmnA3h9QdkYJXhcvGSTuDLv67ACvnUJED2jvG/i8XfrrlUmFwl2BmRNNj0m5JX/f2qb6Po/KP0u19Tp3IU9jxOGcBk+wmp8UoWloJMWsn65m0YgM3cBtBtZECw/b/59hWq6mBH4YGLHipjoVctH1nX4y7L2PIffErksVUaiDs+c0WAYIj7th8YPcd7qs2yblId7/wov8H3Ke+g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040495)(2401047)(8121501046)(5005006)(10201501046)(3231023)(2400065)(944501161)(3002001)(93006095)(93001095)(6041282)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR0801MB1995; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR0801MB1995; X-Forefront-PRVS: 05568D1FF7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(39850400004)(376002)(396003)(39380400002)(366004)(199004)(189003)(50226002)(6512007)(16586007)(316002)(2906002)(16526018)(53936002)(2351001)(6666003)(5660300001)(66066001)(51416003)(6916009)(69596002)(59450400001)(7736002)(2950100002)(86362001)(2361001)(76176011)(478600001)(97736004)(107886003)(105586002)(50466002)(6116002)(47776003)(68736007)(52116002)(26005)(8676002)(6506007)(305945005)(3846002)(386003)(36756003)(81166006)(81156014)(53416004)(6486002)(8936002)(25786009)(106356001)(4326008)(48376002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1995; H:xantnef-ws.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; HE1PR0801MB1995; 23:bq0UN95K3xEBuNHt9JwEEidTT7AOzgLWfgl5SCf?= =?us-ascii?Q?nJHy8jaQZTyH+C1JL+J3LT9v4hGZ+wpUzAf9QOqzmVNvOavbseEGK7Qa9649?= =?us-ascii?Q?DMSwD1GnkM+WZSCWKeV05i+5VKzDXffBXjJQZM925dJsg6H1hk0cKLjXTcNw?= =?us-ascii?Q?ZSfxwfSA7FXDBiEfcKxpVNwI6lhjYM/cN+/eOrWrWI2dL+6drs9lYCCUe33K?= =?us-ascii?Q?ewyNDJt49PQJVTd28MC9qriHuTxfnJEza/obVYPHs9Fh3x4ufelapek/PSDZ?= =?us-ascii?Q?qXQJJMb1Eg+Pqh11RiV2QNApMIT279xFlwDWS+iSC3KzzoqnzsXiVj5/ySoH?= =?us-ascii?Q?zk4r8JGz/CerME8hg/f3m3MtocRMcvpiCF3CkMSbEwqu+fViyUhrocdn1ln7?= =?us-ascii?Q?sVbEa0VdT0rs24NO28FnoDcOja7LINicVmBzvKwSxkLap4GJ3ehzc9HEocdh?= =?us-ascii?Q?YIorO8y/629x4ffz5rkiR0cVrAs5bcc7XRj3jC9QcjK1+ABdzWB+AqSMKdZM?= =?us-ascii?Q?mTAnuZM4GPnrbbfg2BGWWpbqgu0ZYK9GeUqt7EcWWVlfaIsXrs01EdJeW9wD?= =?us-ascii?Q?s7GE671YmfkE2HbKldmRHw0cY+pPfhYMkEXlU00x/Z3OV/uOHIWI+RI5Xicz?= =?us-ascii?Q?VCYMygR012Gicn1PAZqUesjCzWhSj4oCQcgWxZhaLALDuIWXWo1z00J28jmu?= =?us-ascii?Q?ElKeiz4MLoUq3xXkBdlmWjCxjdRFDQkN0HimJ65D9B4/aQI9azb40pUU2GiW?= =?us-ascii?Q?H+AECRVWLVrjFuntOQX8v+Cko5B/Eemvh7qdR2inzCbQXxTrFnigVLbU992N?= =?us-ascii?Q?QTea4ljiRFzwhea0uQ5/EzBqfx2l9VzE7ML+iORaK3AhQHQwF0QpKBlZuDXr?= =?us-ascii?Q?7flX87AwT4KDD2dfFNZZ2YXv9m+34w4ALF7qjxom7mO4ndPRH2hjXjv2sTMa?= =?us-ascii?Q?zr6Khqib/B6pC5yqx02nC516RU4zhveltM8ZJlQgPyiU9/1SaZ2x27ztcEqk?= =?us-ascii?Q?P14haBrFD5g5QtSz6oNB8yqTz2lQSRz3uSF0ijopY+PJSj8YYeo1b1GElkwT?= =?us-ascii?Q?YWHz5Alz23BSPRN8zGb/Ev3udn8V/ESHWNla9eHWBXxpuKXVeE3yOow3HkjW?= =?us-ascii?Q?dri9DC84UIGczHU77joYYV4UDOqSN4c05/285OYJy6/MaW9UA2zA7S/OCGDr?= =?us-ascii?Q?5IKSTRRLZghq/4KhBOVRxDDU8yb/b/5YV8JNJ?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1995; 6:pH3SSgP6VSyRCLtRAJODk6NNU9kzFAvKpwwo+NmwaPsnTeoLNlQCFpNW+U2+yCV3i5p75k7P2S5076DPjo5yqfVrFoAXlUj00WTcjSgbbXjIdK8lQu2y79JW0kRCoOeVa2No6hL4wZ8Fl4XQR1veEGaaTUbHerBuJqqzDxvB2CeZn5yGT8WCd3TC6q+HAVUnT0guMaSs+aW23xfhvbhWmD8qDlczMQu6giNBuGyCM0RxDvrocn9g4PIznSeJKDUvwDfmuvXyOw2r2IDDKxe2s7wOjoI9+/zmL5mNFRUZzYGdl29/nqe8bOy+DvzU8a4YgixAMkbgaYacSqmw9UVvafVQ7yl6MT6oYNbB1Iikbqo=; 5:GqOBuC75S9vizN+zJS2jZH/C2Ku2oZUnPTEH7Ye87tW393fz33rhN0wR0t3su0AO5AhOxH7OS5mOZn1dm9YMDUnCiw3pH1ci1kqfltsjJx3YtgljEZARKxvnwoSp4mok9U9etOdSDIQZ+gCbAcCxOvbSzmesUGztpQsQLF1ALko=; 24:9XIHkAMv6V7cRWqdGSaXN908IZNE16MwfC8x2Dt6xcwSgyq8jUysq/6x9l3VyAqiROX3Ip1Av7UYU3pB7P9oiX+gC4NcoMW8nNTytbmRS2Q=; 7:LvqQbe6BFtEZALmzJEwMvxAHPcmPHzp5oZlDNInh95921a2la7iAGGCM/CXB+GWFingACQRYRseSvq8/P42m2bQtu1GUfoQ0WcUmOyFtAOhtHemFlTPMoUlMANQQW15MSdlo6byr3uC+3fiEDvXdXrC90M4I03POyLDHAArFZrVkYyfL68SJuhBFTi5/vL8uSj4wjZPxCAd0ItzPa0jO4QAQ2BM67BDi8lPdnvmAPxeH1zprVbAk372XMwaW6yff SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1995; 20:8uNeT3YlPdbTQAjn75y4LU0ajT2nmN8ZalzsvVe3inkF1ACd9Ey7gaOsEjbK9rj3CtJVqAqFmTY/UQBBwyOH3WbW6WA/IbaU0LBzlGGbaSx/xMrDNECjXOpTNcNFseoLKGE/qpkzBR1rXTEU5LF3He3M0Aru6CWo3+GiryB+fBw= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 17:49:22.5677 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d186755-db9e-4c85-6b5a-08d55e9bcf00 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1995 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe08::716 Subject: [Qemu-devel] [PATCH v7 1/9] mirror: inherit 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: Eric Blake Reviewed-by: Alberto Garcia --- block/mirror.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/block/mirror.c b/block/mirror.c index c9badc1..d18ec65 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1064,6 +1064,11 @@ static void bdrv_mirror_top_refresh_filename(BlockDriverState *bs, QDict *opts) bdrv_refresh_filename(bs->backing->bs); pstrcpy(bs->exact_filename, sizeof(bs->exact_filename), bs->backing->bs->filename); + bs->supported_write_flags = BDRV_REQ_FUA & + bs->backing->bs->supported_write_flags; + bs->supported_zero_flags = + (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) & + bs->backing->bs->supported_zero_flags; } static void bdrv_mirror_top_close(BlockDriverState *bs)