From patchwork Wed Nov 1 15:43:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10036689 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 B477B602B5 for ; Wed, 1 Nov 2017 15:57:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B609D2852B for ; Wed, 1 Nov 2017 15:57:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA9A7285E6; Wed, 1 Nov 2017 15:57:58 +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 0C78D2852B for ; Wed, 1 Nov 2017 15:57:58 +0000 (UTC) Received: from localhost ([::1]:56447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9vOv-0001qg-8m for patchwork-qemu-devel@patchwork.kernel.org; Wed, 01 Nov 2017 11:57:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9vCC-00088e-46 for qemu-devel@nongnu.org; Wed, 01 Nov 2017 11:44:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9vC7-0006eE-S8 for qemu-devel@nongnu.org; Wed, 01 Nov 2017 11:44:48 -0400 Received: from mail-eopbgr40093.outbound.protection.outlook.com ([40.107.4.93]:2721 helo=EUR03-DB5-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 1e9vC7-0006d1-JO; Wed, 01 Nov 2017 11:44:43 -0400 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=fdCD1QswyWmcuudAcOXkTu0Jn3kSzHhz2iiPs7WPuqQ=; b=PCCKa9PMt3a5s8TDz/P/mCUdJRcLobvPU7Rac6r+FIy+WZzjFyhQ406A/ue6DWx9syviOT6nddR6w9CFNV466bCT8ULpbXuCpBdDTCUdjTskNvByJIOZLdJp38umnU2d2VOCOVe8Q0WRjJQjb2UCh/XZh5DqSVVwyn03tW9FSto= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by AM5PR0801MB1987.eurprd08.prod.outlook.com (2603:10a6:203:4b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Wed, 1 Nov 2017 15:44:41 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Wed, 1 Nov 2017 18:43:59 +0300 Message-Id: <1509551048-129830-7-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509551048-129830-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1509551048-129830-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: VI1PR0501CA0017.eurprd05.prod.outlook.com (2603:10a6:800:92::27) To AM5PR0801MB1987.eurprd08.prod.outlook.com (2603:10a6:203:4b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 01721ec8-d158-4a6d-fdae-08d5213f77cb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603199); SRVR:AM5PR0801MB1987; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 3:nlPB2HiV7FcFls5ThI7IPlSrvGNFVhHdEsAzDUM65CdyrEvyUlTlEMVCMYjBBJOBksnVjzYw8sl6enf3gSQYrpNZjajdhnLwnZQu0Mg30QEIY+87i4H27FQSGW2ZT1/COEo2KDk29m7qCe2jdfxLeK7lMZ7c7+WT+5dgt+xr3Cmp1obkjgbL8zg96ZCKSz8HieVIkOGkQW5SKtjSk2aMs/2jy9rE7v7qGMmnqX8698gk+mlt5cUACIbXdSLNvLc7; 25:ktkB6ofWIXTr5/UOhGIWlZd9a47nw8a/f9MNUvc9NePUYTApE9UToirNIW7UguSpU+I7DDicfiZ+cpredU07LSZNDVSJByPGfA6VawTgKI6iv66eqTmBWVexcNWv9oVafTj5AUyu5U6/hkO1pIyBRC5xMph5AOpusNxBfS0qav7Yw4FRfcLFeTUBSDVjOqyPH2MqRSnrcGUEXu5li48wOEQbtO12NiG3Q6ISWshnfdl6ihcKMJ/C5N0gUXIA3OwDp5LsQgR8HCVi3Z6Fj0qqRYeKTonDFqlHTUTxBxBoKbu/rKF0HR/KIzeZ0MFtVA2qm/rERpRtfSMQI6zUoEJ7VA==; 31:HA4Z2zOAnjD39ghdBkq9YIa2UxNqs9HsWMfuh/OG4fsAu0VtlzHUwXA1pqVj+KZ7Erz9hIDj4PIgL/qkQ39WqDqgQr4wgLpCIfeJiDexNXSRO4cSdl+G0a4vijpStoMbi36N1O5yulm6r6ZB1BQvIN8TyENeh+lYNWOcQZpLInp4KNObaCvg4SQR07Y6WD/jjL+ZPL7PJ11cM5NtaT8p0fdHJ7vGoP3YQibFK6Qyleg= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1987: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:nDw+6moHBByVF/hxpMgYDiODhb7VGk7EOGVGCQ02LylFUsWkilcPfeoE3GMnWrzQq7KQl0Zi6POmvlAec5xVysDloGE5OjlTay+xMhXr+91a9bu484mcl068RARDlzpDsbWnDkfo8gx1YLgLulvZnAGrr4FrNRriiMTCBNkRau3RD7+0eqOC6eRzjtzgsUjZAP0n0afcR49SJ+bnpZOEYgnKp8XRUyq1tyffoigcRGfLcuxP93zzBz6owfxEdGwL5IX18Lo/Cqn2cowteLeb4umEzyKtXpWz16a9eEGWrHXxGcgUj73F3YAyG7M1ol8ft9/wIejghy0bV06nuBWKU05XehLUXS06CV8yYFFwCXj4h98EZMVDEGdt2QyhY26gGQV6+JADJlj0rTTCQnDutwdB9UxDhrFX98Ms4AqNC9U=; 4:WM7o/K6Kp7KgU/hb9G+L3/ZAywZlZWXCzrRH5aHrvuYgZLclfVyAdWeOZensEOyYHmYxaZ1VB8+8SfM/kjockervboRWyfMcwpMHDIi1rBOdGNX75S8lAG1YC14AEdHT6vG63fCzG37DtVN9+eZbKWM0RGRG5HhdUscq3EGAWr0Z8YeuumP3TL9jyl+E35a42pusfbK7bXYhxaWzYEzJqjp0i4rE4QfTeVCBcUs6Lr2jA7XW452oZWdJ0m75FhMrEpX7OY3eNYo61BbxWSU/Mw== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231020)(100000703101)(100105400095)(3002001)(6041248)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0801MB1987; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0801MB1987; X-Forefront-PRVS: 0478C23FE0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(376002)(346002)(189002)(199003)(6666003)(16526018)(53936002)(107886003)(48376002)(86362001)(6916009)(2950100002)(3846002)(6116002)(101416001)(50986999)(76176999)(106356001)(69596002)(5660300001)(25786009)(105586002)(316002)(53416004)(2351001)(16586007)(2361001)(33646002)(4326008)(5003940100001)(478600001)(66066001)(36756003)(50226002)(6512007)(47776003)(2906002)(8936002)(6506006)(97736004)(6486002)(68736007)(305945005)(50466002)(81166006)(81156014)(8676002)(189998001)(7736002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1987; 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; AM5PR0801MB1987; 23:JMTMdeU71hTrb4DcAhAIJDOZsYCUU1N+4yG1lf5?= =?us-ascii?Q?W14O54i6pCZ+1IjwLyF+ylWMdXU9GLErrwylcos/fHgpenfraWq2Qhx42y4f?= =?us-ascii?Q?y0NfdHLbHR2G/y7iB1L4I+ResQZCUcKF/H6HuwNlf9zY4u0PwYDqSPFTP0X4?= =?us-ascii?Q?AZJgA689xaRHvinpvOe/YOJdP5bXelsuQWe58e+w8rd6ZZW0MtEji9cHouqF?= =?us-ascii?Q?dAqcsoy5VNKJnV1BVwPyIhVn5j/YUsjiob/c6AyzsRO3qjobdBk6OApvBFCm?= =?us-ascii?Q?V8enP+Xt1QsM0GY+dMPzEvvdiX/9X6KbD1eUnzwAQC6tPMiwgp2OeQ0+K5we?= =?us-ascii?Q?06K0MQy+kz2YjPUsdvMR4XkMEKNDJHdmxzO0E7hvKQLilm9MHW5omnrHkvso?= =?us-ascii?Q?fJYOu8RskqsR8c+nM0+BhpfROBSPENnmLkOUkbiUbcVtuozNX+gxPMCTkXeE?= =?us-ascii?Q?l5oj/dx2y04v3rntMrbHDkHa4njiPUy86jefR3UcA63dSZW3hZET74GISv41?= =?us-ascii?Q?akfHLEOFh35wgJsIH3k2HTJXD4jaWm3FUmuZ4p218AgErcqNscn1NOhfzvKH?= =?us-ascii?Q?lnsoFilohB+kxMJOgRsn85x/4buBXol6LUx5mPE3N8fKSHi5Zl6H3NJ3anW/?= =?us-ascii?Q?t1JRQaN2H9VvzuyL4BAmIi8MFe8golbJlF0WAXKVzfXBtSKaEEkzbWKvmeYf?= =?us-ascii?Q?IG6QWf7N3d27lu3ZCzizCH8A1IbdQvxVI8i1lwoym/pIN2FvKuKROQG9M2kD?= =?us-ascii?Q?2Udh2G/nsMLy0uahmWwpM1YVuKHhjT89p5YcQS2Am+elri1E0uJLfvoSdYGD?= =?us-ascii?Q?POA+dxqQoQabma+71vqUWKzyfFnmt3ZaaDGPW/LnNciQC36L6+b0T8AqcJre?= =?us-ascii?Q?vGmE4r2TEGr18kK8ZVs0McavTpTn+YCvrZkNwRfZibpi0iki2gPIL6mBqqXB?= =?us-ascii?Q?kq4S0r4mkc6ycYSKG9EE0NDBQmu5QP0o9okBin3Pd5yVjMdgdlnzAR99tN3F?= =?us-ascii?Q?CX1WsVAt4i/+/vVr2amV9G+OwGywCbQKdwxZ0HTXOIWs39vFepa/4niaGQdY?= =?us-ascii?Q?fVhhhMdVFWXVvqXeCQSmuSsFlKUFeUPAOnalKD6mtIZeSxOli1uBE+7WJXG0?= =?us-ascii?Q?ZljK0wjqt1Owa0irZYqeuDeHKFQd+3fTwI+RxU1lMCYQXo+O012uzPw=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 6:kDtHkby/bmD5lJdi4nn3KbTH/21sdfF5ikRZHVDtYg6qwrgx/aVgBOU5N/+7Tm+kAKjmrGqljMEbDamg1yYCYh94CfB6tdV+aScsCyMZr73CcP7WlNdPnypbO7N7rCNCU70ToqeNkDTO8gkZFnh7p4BHnsNQzvudskcTWpSfa26RHiNcogEErhIrLWjloTnRhFqtUM1Gq4AUkvRY0+m7k1oyZvdiukJXYX/j+/kJv9kaLKcvTi2b8S8S1HmhE+H9Ph5xJ58BpPvXNMGrV5KcogaTruaJxDg2GgDaxlR67nEt0iShpzhnlumZVhc1oSLgGM7rTK3kChL6kamEek4QQgp+n/fOCQwijTY1QVjO4J0=; 5:Y9xbyvMYVBQ1FIajE7IomWt/9Y/YeluHfhisy1cVKKZVPSXytZZTCxAZWPp8WpBjeroDHoD7gbT4rRRvhY4QytK+lhMseMpbKc3RMgvpJfKigOoCXX3m9jJ06z7FrIKa7c/MFHxiwtAw0XmDbtMFxw1mWwrOqn4JRqPuO4kudQQ=; 24:EI0QXOzs/ArRghy+6cerQAyMOmNsTkjarKaCX6moFfuy1YNo9/o2iE5jNgyFH+RGyRxpMHkH7eqARYtZRP38A2Q3n3Mg4LrYpvch9JYxdn0=; 7:reZEn0CjL0sd3A5VwxgqcHYo6tuRFezTIREHlvWZ7VrI7FZO7StpibbNGO6gf+O+CI58NBsNqMcLOvIMIRM6qTr03P9sArnN4THrymGf4Yp8b7mRVN5G5GEfXajxbbR8J9DooNV2pQ6JDw246u1Ec0V4aADLMUB9CdopTqTSUYvwwdjawRWUtuLbBxFRmMfZqavPjgMwKWieHk/Oy+OjdAbAqvrDYlJpkg5Ue8HKvItux2l6E3cxPYLds/RjcKPQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:r8QeldxZo62nv9NpC3tywLZbAzF+uWrzgAU17tGZj35DYjFhpo7Nv9iYjKYlIC1+zQ1D0hnDKkQGfGxfe8a5Rh+DbZuvc3PfxlscAa12shr+zy/+5lR36ShKR6i45UzTpdm8DGWqpIH5DD3VUrX8O7m9KUaau36Oqg0ux5ZiLAY= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2017 15:44:41.0088 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 01721ec8-d158-4a6d-fdae-08d5213f77cb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1987 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.4.93 Subject: [Qemu-devel] [PATCH v5 06/15] block: support BDRV_REQ_ALLOCATE in passthrough drivers 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 Support the flag if the underlying BDS supports it Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- block/blkdebug.c | 3 ++- block/blkverify.c | 2 +- block/mirror.c | 2 +- block/raw-format.c | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index e216699..7d5773d 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -400,7 +400,8 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags, bs->supported_write_flags = BDRV_REQ_FUA & bs->file->bs->supported_write_flags; - bs->supported_zero_flags = (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) & + bs->supported_zero_flags = + (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP | BDRV_REQ_ALLOCATE) & bs->file->bs->supported_zero_flags; ret = -EINVAL; diff --git a/block/blkverify.c b/block/blkverify.c index 9ba65d0..b249636 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -145,7 +145,7 @@ static int blkverify_open(BlockDriverState *bs, QDict *options, int flags, s->test_file->bs->supported_write_flags; bs->supported_zero_flags = - (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) & + (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP | BDRV_REQ_ALLOCATE) & bs->file->bs->supported_zero_flags & s->test_file->bs->supported_zero_flags; diff --git a/block/mirror.c b/block/mirror.c index 19c8987..404c3e9 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1067,7 +1067,7 @@ static void bdrv_mirror_top_refresh_filename(BlockDriverState *bs, QDict *opts) bs->supported_write_flags = BDRV_REQ_FUA & bs->backing->bs->supported_write_flags; bs->supported_zero_flags = - (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) & + (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP | BDRV_REQ_ALLOCATE) & bs->backing->bs->supported_zero_flags; } diff --git a/block/raw-format.c b/block/raw-format.c index ab552c0..b1deb93 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -416,7 +416,8 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags, bs->sg = bs->file->bs->sg; bs->supported_write_flags = BDRV_REQ_FUA & bs->file->bs->supported_write_flags; - bs->supported_zero_flags = (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) & + bs->supported_zero_flags = + (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP | BDRV_REQ_ALLOCATE) & bs->file->bs->supported_zero_flags; if (bs->probed && !bdrv_is_read_only(bs)) {