From patchwork Thu Aug 20 18:39:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 275977 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B8FFC433E1 for ; Thu, 20 Aug 2020 18:43:28 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D85B9206DA for ; Thu, 20 Aug 2020 18:43:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="oYkAs51I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D85B9206DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8pX5-00056R-4M for qemu-devel@archiver.kernel.org; Thu, 20 Aug 2020 14:43:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8pU4-0000f1-3d; Thu, 20 Aug 2020 14:40:20 -0400 Received: from mail-eopbgr00104.outbound.protection.outlook.com ([40.107.0.104]:1630 helo=EUR02-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8pU0-0003CQ-LG; Thu, 20 Aug 2020 14:40:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GBiRo/UBCqb/Ty3eTZVSxkxGszp2uwf6OLB1rRg7w37MJ3W6s4o5MVqfHwALBC3g8bfF9MNjBXRPRaHyqanaH+ytT2++q/oQyzSFqRLC/8xhkLB7DR36IhT8e53Q6mj/OVoU1R5Q4Ei1of70nhfJNdiz4LFIjLCs6HXn8n4PvOZl94UtOhn2L+lbzMYDPxT9TI0VBsVOsWxkbL9o+Bzzt/kdtuo0w7+yRFzRYMyEQ+0I08CjdCQS7iQBhxfgWQXKJhmAhnCuxREPo3l81RkyoBUdBoNLI8UL6kbYFdJ3k171DWjX9XQtGKv7OSGE5s1ZG8zcF21HHru40HtZJg57WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T6ADkc6uYMLabKqyv9ENA7/hX8HBJxK5upg5p8B/ZEw=; b=NU55x8MyL95otdMvAoWufwfYClk+DkiNBgvCrPXKvgN2h4N1o/oMVIcjM8Xg84jZi60mPQQRQeKFusojqyA/WQKvAmVzQVnPj2/yeWg+rkVz03g9g6rpdLx/pWD6bAdwV9VBgyvjnEn8m6fNF+D/U00gGDEnBM/iPByWSGd9eozeu2YBeXFJ1or2831XfM/O4JP6BtJxyU4JLtoUbJhjDC1owNPtxHtN9YtrwcQSj4ukVeub7KU876G/i7v8iVfnF2h+FXwnxKVjd43RwxPkvq4J4JusqGQRvnm2xYtAEH08x1PuP6xYdGLZdpHxM/gt0tuewRKjtB9J4mi1jSsuYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T6ADkc6uYMLabKqyv9ENA7/hX8HBJxK5upg5p8B/ZEw=; b=oYkAs51IndqwbZjPANADAN5XEAoGMqpCVZPwQXMt3RF032wLHIBlM+y1+iUvB3M8F4bQdxqcp0V2GNJaCNaJX7RQm79YvInAQ3wXHq5DZaBqoTE+ONdWNy3GQh27pnfUWol01c6GUFvAp/05k7wIQWzNmerxUkOalTHLjW0qgP8= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB3032.eurprd08.prod.outlook.com (2603:10a6:209:43::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25; Thu, 20 Aug 2020 18:40:05 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a%3]) with mapi id 15.20.3283.027; Thu, 20 Aug 2020 18:40:05 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v4 01/10] block: simplify comment to BDRV_REQ_SERIALISING Date: Thu, 20 Aug 2020 21:39:41 +0300 Message-Id: <20200820183950.13109-2-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200820183950.13109-1-vsementsov@virtuozzo.com> References: <20200820183950.13109-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM4PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:200:89::13) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from kvm.sw.ru (185.215.60.171) by AM4PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:200:89::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25 via Frontend Transport; Thu, 20 Aug 2020 18:40:04 +0000 X-Mailer: git-send-email 2.21.3 X-Originating-IP: [185.215.60.171] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ffcc4da-8d39-48b8-b771-08d845387472 X-MS-TrafficTypeDiagnostic: AM6PR08MB3032: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oXQhYPOz6R9JYiHo6aLzPawunKaYYgM8un83h9oDLjLkt+jvJjvgJSocb0Kx95U7jqi3IqBl2QhYi6xxTuT2fnYnJqUnxCGSJtcDRP5zYIp3xMeFicw5QfX85LODMiMMpV6Dm37Nldb2DmyIoaalXgyDz1qDJ4X/Vhgq0nbRsRX+v1FrT2t0w5Y+1lX8kkpqEEKTu8x+T52WwpAnlQaFmQRaa/iTPqyj9xsADJR6ynYTEr88HZ3TDdKZsVeKguj9jbiIyct0ogVwml+hNlS7UBWRLZTwZAbOd5U8FJw83pXr4jtsYWvZN132hSCqfOQMgIQzwWhejMfj2avjuDTsXg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39840400004)(376002)(346002)(396003)(136003)(4326008)(6666004)(8676002)(16526019)(186003)(26005)(316002)(107886003)(6486002)(83380400001)(36756003)(86362001)(2906002)(478600001)(6916009)(5660300002)(8936002)(66946007)(66476007)(66556008)(6506007)(1076003)(6512007)(956004)(2616005)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: zs5MA4mhq1cD7ueBJa1GLShLzC11u2wyIJuoru6WETglEoEw7Nsol5pEIqjdGARbolvR5D88ZVkWEBScyzgEnWHmc9Ru1rHqxk2hPQ47rVHq7faXSj7k3bjK09TRo0BhQIS60krYZo2y75oQrTS1c00qrisTH87Z0T4/ICOpnetg0/0K7OOiII9wmDdWCh7DbZ2Fd+IFNcii6YBiDfoyH7MZZAjk8a4RT605xR6UbEu7Jl0gz+pK2Y5+9otLMxQJZCpaqK24pvEVvzXEmt/Sqfe1I79UtUX5Kbdi4ce04FTctSInwKP5vur8tXcCcwsNghqfWov+aBPGNqhOlvqxj1BRpIQzsKAMLLKR6GXjEXzershB2m9VeoeBkS/2riPiYhDCgtVbyWg3zfoUMl/VpB8F+K7vWvpQXvBhR2rRZ1BZpCVDPoPvr31krY95KZdfNOfK8GdNncp9JplIl0x7gEcgK7CdQtQbzOsKLlQn8Ttlxkom1Niqn2aCZXnDv+6DXJ29WeAOVNz1PZbbB99qzW124/DdnYidKv4Q4xxfMrsPzX9NizgOkpSil/qvZgwfKEfnmHJaGQuYIsjZEh6+O6X8qLrvJ8tjc+9YOmWTXWZqPukr5bQCkUOfuNlCeFeHtvUlh4mU9De+UMvZIw02xw== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ffcc4da-8d39-48b8-b771-08d845387472 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2020 18:40:04.9106 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: n/h7JLtHK+AKFiKmX68la/gXghj1zB8+U+4SJQNebbqYdzKluvLJqwjBw/Rxy7Ly+RPi+pMH04LSotDttAtjniVTuZb2SGZ/KgpdxyDk7Kk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3032 Received-SPF: pass client-ip=40.107.0.104; envelope-from=vsementsov@virtuozzo.com; helo=EUR02-AM5-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 14:40:13 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 1. BDRV_REQ_NO_SERIALISING doesn't exist already, don't mention it. 2. We are going to add one more user of BDRV_REQ_SERIALISING, so comment about backup becomes a bit confusing here. The use case in backup is documented in block/backup.c, so let's just drop duplication here. 3. The fact that BDRV_REQ_SERIALISING is only for write requests is omitted. Add a note. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi --- include/block/block.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/include/block/block.h b/include/block/block.h index 6e36154061..b8f4e86e8d 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -53,16 +53,7 @@ typedef enum { * content. */ BDRV_REQ_WRITE_UNCHANGED = 0x40, - /* - * BDRV_REQ_SERIALISING forces request serialisation for writes. - * It is used to ensure that writes to the backing file of a backup process - * target cannot race with a read of the backup target that defers to the - * backing file. - * - * Note, that BDRV_REQ_SERIALISING is _not_ opposite in meaning to - * BDRV_REQ_NO_SERIALISING. A more descriptive name for the latter might be - * _DO_NOT_WAIT_FOR_SERIALISING, except that is too long. - */ + /* Forces request serialisation. Use only with write requests. */ BDRV_REQ_SERIALISING = 0x80, /* Execute the request only if the operation can be offloaded or otherwise From patchwork Thu Aug 20 18:39:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 275976 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F344C433DF for ; Thu, 20 Aug 2020 18:45:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D5294206DA for ; Thu, 20 Aug 2020 18:45:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="Tdi3S7hV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5294206DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8pYi-0007Nu-5J for qemu-devel@archiver.kernel.org; Thu, 20 Aug 2020 14:45:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8pU5-0000gx-QY; Thu, 20 Aug 2020 14:40:21 -0400 Received: from mail-eopbgr00105.outbound.protection.outlook.com ([40.107.0.105]:40648 helo=EUR02-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8pU2-0003Bm-BK; Thu, 20 Aug 2020 14:40:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YGeHF3kvw+HTEehCTUCkPtJFhRSu4O/qsD+0UBSMWh1D6PnV72hxN7g3yEEcOGmwYI/oEcWyZwbnggWx7SbdNT8y7+Jk5xVyDDDC4tB/RPy4dg/x53EAgSzzbZKG3w9+9S5t94fbn1x8jJTzTygj/4Z0JI7gWHxULSStXWEIAe5VRAmQgH4glkUJtpx7qI1l7Y4CrhUezFEELlj3LEstH4X9EsYtH1zo8Xk+73VjcD6G0RcuJcS0SWU4U85XwYxOYc9a4CzG8WToqJppgu8NPFzD3cx1ddAMTYSHmJbNsVkfVeMf6qO7AHAIG5AInQkqJUY/iZ2G6O+NAn5dYBGsyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0386wauxXmSK63FI+OC2yIics9gF/T4FfYX7cSlvOt0=; b=KErhmB8Wvh9zmzSn0Kh6lhjATEZPbl2kEDVnSQMp3o1ptrMmVqQy/nl4LeA1sZGe5UOOphuGUGTEKFvI8mnJxbWwSmBpwo8K2MW9IIoILpM1DDokHXG9zweD2jZm4mtr3J2oNjTqqvrcNuBdf/J2shV4q5vxA07aEy9i6ZGDQBublXJ8AslNVmLPgc5LK9cVWWrmdG9Jow52r/faEwQ7C6xu28wRSKJfciYVYjCMgRQR612u+ntwsbPI5+/1lH7y9hMQGjIEVTity9W/OHVCKtiHtxsczG24hwgMb2SdLQSLZh9gdx3NuplcyhjsvABaPMvGDwFVETZk+O1Fx+7xIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0386wauxXmSK63FI+OC2yIics9gF/T4FfYX7cSlvOt0=; b=Tdi3S7hVyuXLkDaXsiCZbPGdgSjw39r2O8h5AEPcl8YRNtHeRZzopXIpxylTb5fOTpAbB4sS/Bv3vpTWbe1zGKzGJxqJMK9ahBnjXObeqniPsOyb/KgrPktIAlAVVy8/HbKZZDYOUR0KAAVNk6N6rEH1kjk12UPxh7boAfhhWjQ= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB3032.eurprd08.prod.outlook.com (2603:10a6:209:43::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25; Thu, 20 Aug 2020 18:40:05 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a%3]) with mapi id 15.20.3283.027; Thu, 20 Aug 2020 18:40:05 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v4 02/10] block/io.c: drop assertion on double waiting for request serialisation Date: Thu, 20 Aug 2020 21:39:42 +0300 Message-Id: <20200820183950.13109-3-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200820183950.13109-1-vsementsov@virtuozzo.com> References: <20200820183950.13109-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM4PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:200:89::13) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from kvm.sw.ru (185.215.60.171) by AM4PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:200:89::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25 via Frontend Transport; Thu, 20 Aug 2020 18:40:05 +0000 X-Mailer: git-send-email 2.21.3 X-Originating-IP: [185.215.60.171] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6e34673f-3f3c-425e-50a8-08d8453874f9 X-MS-TrafficTypeDiagnostic: AM6PR08MB3032: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H22EwgTuQUNi7hdu14FGy9+7RD1CRKltrB8w7h3Wb+6JciMFIini2rXibTpjaG9JJ2bS952x2olvCYz6xRNcyJKQpaDBNVjOZ7ryqu9RTlyOlRIY7YVMvQCQiUhhSbudgblNDGlIRbcpsF6BYSUh0ir8RfELslhYJZn23/3mCtKGzDlzCjSPQG7bDp9QArEMbLsOILw2Z9tG25lnExXNbAYBxNdzAvRWyX42YDyWlX7Hu+d2J/GGdf40YXaD6ADalKsjwZGWZhbP5jPUikNhTQWCBCHzbJh3KAzHJfMya+mpM0untRIaKJDpmOcXZoObgEjOFWVfYp63o3RKWsfCPQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39840400004)(376002)(346002)(396003)(136003)(4326008)(6666004)(8676002)(16526019)(186003)(26005)(316002)(6486002)(83380400001)(36756003)(86362001)(2906002)(478600001)(6916009)(5660300002)(8936002)(66946007)(66476007)(66556008)(6506007)(1076003)(6512007)(956004)(2616005)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: KSfhn5nAAh5+a7b1heexq1Y/jS1HH1BUg1DEZZDkSYKgfDeyvvFProl30RUoful3K/Ndd9jXqFJQQa/IARme8sS0TAm8udav/ggYfYECUGDKJcyBuu0OApmdTrgNaGS/jB3Wh/urZ6YjZv4iklqsnv2QS4dd5t39gCEQnxMJg3D7r0WZRlFRmuo35YnSZLZ+fxbc92X35vUkEqrX2Hh9M1xy5I1t1DJ4NX4vL2YdAerGLdbI/eCD0A+Dsl28ya1ZtpJ+crQCSPzTJqpoPY4kTYv+Oi4Licd7r9E4Mn2+pRccFA2/SXM4L7HFpjtLlHw+RzcsZ3eJFK/BCc+lAVMgbX8EfD6kEYNKmIrp9AH19YnCNGHg9L0FUwVwtFLiSP2GY3NZklPAs0QBqWhhT3O8r3nHdvHVhgtw41jshlWvvFnDOjpMLq4oUlu1RJ5MkJDt4hxGvwGkJTLz4LtM87r6tgP7E48UPsycV0tDcC2N5Fjacr/0nHisMTi1KzEqVZf50pJl9snONoiLvwUhPIIj8S1h38reiXEYGMf2SSjNob13kU1cNCIDayiRCfKYEPDwMzRdOQcagPAEXY5f1zO+cxDny3sr7bfUh16u+cmM/jKmVEowdS2oLS4k/JEWfRhxYdYZd0qx+aNBZN2Ml4Vb9g== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e34673f-3f3c-425e-50a8-08d8453874f9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2020 18:40:05.8305 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4k4PWSpm3qvHMds9GsEQTLyjEjwaUMzpZokZkfbfiaIfdQ8UUQBHpdqynd+qOy/hsvd+sAF6YdlC1qR2KM0DNlkhz75bH/BHfPgOY9iOfDQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3032 Received-SPF: pass client-ip=40.107.0.105; envelope-from=vsementsov@virtuozzo.com; helo=EUR02-AM5-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 14:40:09 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, Paolo Bonzini , den@openvz.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The comments states, that on misaligned request we should have already been waiting. But for bdrv_padding_rmw_read, we called bdrv_mark_request_serialising with align = request_alignment, and now we serialise with align = cluster_size. So we may have to wait again with larger alignment. Note, that the only user of BDRV_REQ_SERIALISING is backup which issues cluster-aligned requests, so seems the assertion should not fire for now. But it's wrong anyway. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Paolo Bonzini --- block/io.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/block/io.c b/block/io.c index ad3a51ed53..b18680a842 100644 --- a/block/io.c +++ b/block/io.c @@ -1881,7 +1881,6 @@ bdrv_co_write_req_prepare(BdrvChild *child, int64_t offset, uint64_t bytes, BdrvTrackedRequest *req, int flags) { BlockDriverState *bs = child->bs; - bool waited; int64_t end_sector = DIV_ROUND_UP(offset + bytes, BDRV_SECTOR_SIZE); if (bs->read_only) { @@ -1893,15 +1892,7 @@ bdrv_co_write_req_prepare(BdrvChild *child, int64_t offset, uint64_t bytes, assert(!(flags & ~BDRV_REQ_MASK)); if (flags & BDRV_REQ_SERIALISING) { - waited = bdrv_mark_request_serialising(req, bdrv_get_cluster_size(bs)); - /* - * For a misaligned request we should have already waited earlier, - * because we come after bdrv_padding_rmw_read which must be called - * with the request already marked as serialising. - */ - assert(!waited || - (req->offset == req->overlap_offset && - req->bytes == req->overlap_bytes)); + bdrv_mark_request_serialising(req, bdrv_get_cluster_size(bs)); } else { bdrv_wait_serialising_requests(req); } From patchwork Thu Aug 20 18:39:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 275975 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CF08C433DF for ; Thu, 20 Aug 2020 18:47:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 19173207DE for ; Thu, 20 Aug 2020 18:47:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="GC5l5Xef" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19173207DE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8pb8-00028m-8F for qemu-devel@archiver.kernel.org; Thu, 20 Aug 2020 14:47:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8pUC-0000vY-KC; Thu, 20 Aug 2020 14:40:28 -0400 Received: from mail-eopbgr00105.outbound.protection.outlook.com ([40.107.0.105]:40648 helo=EUR02-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8pUA-0003Bm-JK; Thu, 20 Aug 2020 14:40:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fupogDV7MP1uXD+0/Fb0byuUUFg/LxvfTHDKRZ9Jk2o7YaUSIkvxvC0kC9n/rtugn5QZcUmswCNB1fvJaX2AJA0XMU2otaZDiHA59+30ru2tbM5zWWOomjJF5Dp5o71JWXkSHmg5gg72gyocGfbLxHUY96icAnzpH0xuxJkGUZnOHsSoxr99/SvpDP/dpvR9ygvy7MS6WGFTJNZdvDFDEda49a1cpubVQijOwj8sdkrc0WWwN2or6vOJ9BYWWz0uB2eo7hfcgsk7HkFQM6pzvP32rAlGBXCrExtUkBOyAB0Jn1qMUznvJ6HETJA/Qcp4e65z2cyii0fC5oGEiEyVIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JicS2MgvlUGxcQ4pTtRKtaD7bovqcjl3Q8ZlpEpR78o=; b=gB84tIwsBsKAEdf8LiV/ii2z/taR2j9JdYN09ar16z+qrONAQvZA0xdPl/YZwmgHogPlCjHSYTkzAq/DGbfZg0Ht4f+yKQS8vGGmAqJdOKrgJ12UqXhxVGWH/nfjHvwvXxVZBnZyvN/CzTz/BCuZ0veeUGXUSiZiNXKUgpYGhs8M4DgwW8wfGjkicyqzbfpLUrOXYqXEgEWMGQH+U74Ar4zlBxknc1V/O1hjUFqsgAtVWybJZb4KUjncT/soXeN5m9unouYTNqqPEZlxqKmD4OrkF0cwH4eAf6M6LMsVc1qV6B1PKcCBHwUb4Ha15FgAei/F79EY46kJYuK6e2D7ew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JicS2MgvlUGxcQ4pTtRKtaD7bovqcjl3Q8ZlpEpR78o=; b=GC5l5XeffbNBI+G4rKtHMuVT3JiqTc7Z9k7OXG8cRGo4wET+2qPegUF0dAe0DWt1nHoe1wQwOcvUyQE5IIzbhl7JTbHMKe6O4zDomFlJvSHguCGuo9QBCYrR2NTkXRzYim7kZbgR17pXkO1z69zOpW0k3/RHNjs5pdWtTB95bZA= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB3032.eurprd08.prod.outlook.com (2603:10a6:209:43::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25; Thu, 20 Aug 2020 18:40:09 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a%3]) with mapi id 15.20.3283.027; Thu, 20 Aug 2020 18:40:09 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v4 06/10] block: introduce BDRV_REQ_NO_WAIT flag Date: Thu, 20 Aug 2020 21:39:46 +0300 Message-Id: <20200820183950.13109-7-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200820183950.13109-1-vsementsov@virtuozzo.com> References: <20200820183950.13109-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM4PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:200:89::13) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from kvm.sw.ru (185.215.60.171) by AM4PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:200:89::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25 via Frontend Transport; Thu, 20 Aug 2020 18:40:08 +0000 X-Mailer: git-send-email 2.21.3 X-Originating-IP: [185.215.60.171] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b646398b-683e-4b53-1fe0-08d8453876f9 X-MS-TrafficTypeDiagnostic: AM6PR08MB3032: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:669; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4gZcb+IXsCPNc83V44TYWX//rVSgJWT5v5OZWOnEFYhfIV8ugRWDxk6iFT02VczWL2FdwHXIYd/yfkapbrgctUH0gjRaj5zL8Ix6eVqg+BXXk9eJobu2LIArUEQbwvtuJJ+5uQNAS7Tfqs+YsDJoeSymNONjIGT4jaXVfYAFXYNZgUUbPzqoTHrWfFYJpqJpQj1bteR/RpWT7w0j/DTAmWRIoS920gAU1HFXhttQQJm9iMEFHJE5NgiWydAAk2i7mVp+q5ggBCQbAHepUG13kEsOf7NF2Sjbn16L67GfadpEffc3kkEi8aCRCQ/0Jm4Ap9vHaXy4axU0NXVKbv4pDw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39840400004)(376002)(346002)(396003)(136003)(4326008)(6666004)(8676002)(16526019)(186003)(26005)(316002)(107886003)(6486002)(83380400001)(36756003)(86362001)(2906002)(478600001)(6916009)(5660300002)(8936002)(66946007)(66476007)(66556008)(6506007)(1076003)(6512007)(956004)(2616005)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: M/+vXkrmECJWKwrHqe+D0vGbhBdIMLEf62oyugK5aVBJzmVD/4vGdSI70qUtPfzD4UCIvoFsJpvxc7ghhamOUAPDHXSk+eWuAGoBLu5hTgMrvjbHXXYj4PfXEIs7nLCWTkxgKJodynDay86DhwfKroGHmC3B6df0rpCMKfPwI4OcQb4NdgpGUm8Ty7Q+VT0lK9XcvQY79fDbseBVkJiQeRoBkq0+HP9gYm2nNc6dd9KmXcZcLh8HQZbIvz7nBZF9nE6WF8KMOBIe9hC/4QoIi927DJoMqcA6Ntf12qwABHBoNC+myuIIm32MXhQt08XAOU22qFMIQ+pThuqQbfcoV9Oi5kTzXpJEI9YdBCEMAQI0ngeoGmcsNMGpqkfpP2fmEXQGPWn2sUFgGUnm3VTytnaYJYgFXtJbB2+S4gUC0yBjIRY29khzYlcn+M6+V9lPULVIEEHEU1fjhMYxxgipxBoEdIuPloG8WjpzdNKR95ShdUbNhNxvv0iqZQifLoR8km0bSBUZQhRLhEIexf+24/83kh+VfO+8dX5To0Njg94+g1L67aMagGi0/kO/simV8ohwUodXA7LwN7syoYctNgk5Zxxr7GMmVswfjz3u41mG5aeJ3/YeFQQA4fjr4DmLL7M+VL+3GSoGuSPlJ6Z5kA== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b646398b-683e-4b53-1fe0-08d8453876f9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2020 18:40:09.1618 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qxHVP0gmOEi5xgD/S6QxIopfbxOzpjFGEYdwwoiofZXWRyVwgf9V2ljlAfUsgsdrehtS7kw8w6Yd/NDxijNj80F3g8wMR67B9a+hfPdeVYA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3032 Received-SPF: pass client-ip=40.107.0.105; envelope-from=vsementsov@virtuozzo.com; helo=EUR02-AM5-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 14:40:09 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add flag to make serialising request no wait: if there are conflicting requests, just return error immediately. It's will be used in upcoming preallocate filter. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 9 ++++++++- block/io.c | 11 ++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/block/block.h b/include/block/block.h index b8f4e86e8d..877fda06a4 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -67,8 +67,15 @@ typedef enum { * written to qiov parameter which may be NULL. */ BDRV_REQ_PREFETCH = 0x200, + + /* + * If we need to wait for other requests, just fail immediately. Used + * only together with BDRV_REQ_SERIALISING. + */ + BDRV_REQ_NO_WAIT = 0x400, + /* Mask of valid flags */ - BDRV_REQ_MASK = 0x3ff, + BDRV_REQ_MASK = 0x7ff, } BdrvRequestFlags; typedef struct BlockSizes { diff --git a/block/io.c b/block/io.c index dd28befb08..c93b1e98a3 100644 --- a/block/io.c +++ b/block/io.c @@ -1912,9 +1912,18 @@ bdrv_co_write_req_prepare(BdrvChild *child, int64_t offset, uint64_t bytes, assert(!(bs->open_flags & BDRV_O_INACTIVE)); assert((bs->open_flags & BDRV_O_NO_IO) == 0); assert(!(flags & ~BDRV_REQ_MASK)); + assert(!((flags & BDRV_REQ_NO_WAIT) && !(flags & BDRV_REQ_SERIALISING))); if (flags & BDRV_REQ_SERIALISING) { - bdrv_make_request_serialising(req, bdrv_get_cluster_size(bs)); + QEMU_LOCK_GUARD(&bs->reqs_lock); + + tracked_request_set_serialising(req, bdrv_get_cluster_size(bs)); + + if ((flags & BDRV_REQ_NO_WAIT) && bdrv_find_conflicting_request(req)) { + return -EBUSY; + } + + bdrv_wait_serialising_requests_locked(req); } else { bdrv_wait_serialising_requests(req); } From patchwork Thu Aug 20 18:39:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 275974 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBED8C433E1 for ; Thu, 20 Aug 2020 18:50:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC69A207DE for ; Thu, 20 Aug 2020 18:50:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="SaFEz5xn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC69A207DE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8pdX-0005XH-Ua for qemu-devel@archiver.kernel.org; Thu, 20 Aug 2020 14:50:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8pUH-0000zo-Uk; Thu, 20 Aug 2020 14:40:33 -0400 Received: from mail-eopbgr00105.outbound.protection.outlook.com ([40.107.0.105]:40648 helo=EUR02-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8pUD-0003Bm-67; Thu, 20 Aug 2020 14:40:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CDVldhG9a/wR85WfIRf8IYRn8aUaJwHFLahtCSFPfhpvHbgGquJ+yftNGlAw5OHiDZNSwPDSaZH2sHe1F+30uSo6sRTYfnCBBBBf6OrDQcLNSKRLXUqtcTrRUvAN/XbmIbm6TnXNK/OUee3q23JPe2ADrvUzSTA+4ZUM4enBOmP2dj0VFLz2cXio5nTNA8wQAT7bqRIlxQlVZqi2InqhtpEjqHygl/VakG/Q57t9Ctpi/z96iC9aNjivok/41J61gSFK7wkuPNi8cbODBnRGK3wzU0HaLnGKpUM5NCWkB0Gk6WEPXvYnbOkOkVEHMNEtoyViukpyuAbWgbgm6wd1Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f0KimpCIv/9rLHs7Qo/Hz8Izh/rstRbY80vnHIXsYa0=; b=gVDpIVuSX/SBeephs3S019UduVrp8I5wPI11oPGy3fUUhx9GLSNMcF6LYxosJ7AubqwykE7aVWDtAMUG1TnQ1sfmZqi/lPUBF6b9kyMsCqhEKPSWj7fRktn5bPYK2prnyJmjY4/NKD7TO7EOLSjsXcNBUbv5Ri1S28B0Lze3gqTGODQwYm6fT3HDBTtdYm7g3rI0BfjVgbgTTooMGCLFJKZqO4r4ifA3jsaqYHuQ4diBkXrb8txzqwKiyq2zxj6819igQOXLbU2hmjr5q3ekrJE3WHPOYxfJn+BX/9t1IBALaVM33Lb1ynOD/R3NVnrnF5NqZiP+2/auInoK7vuTGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f0KimpCIv/9rLHs7Qo/Hz8Izh/rstRbY80vnHIXsYa0=; b=SaFEz5xnLApJdJczqWd+k1HCJZu7DcYy76G4ep+LWfaCV3FHoT58WkYk+DaUGURw71sZTucpmDuDnvFYlS8XaOkEbwPEdTRCtN0sHLgV6d4dZqPfPALlwnF46dKzpQB79cz3JfpLD0WxgZDJg/YOnoFGNn65wRXYE978E41r0MI= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB3032.eurprd08.prod.outlook.com (2603:10a6:209:43::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25; Thu, 20 Aug 2020 18:40:11 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a%3]) with mapi id 15.20.3283.027; Thu, 20 Aug 2020 18:40:11 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v4 08/10] iotests.py: add verify_o_direct helper Date: Thu, 20 Aug 2020 21:39:48 +0300 Message-Id: <20200820183950.13109-9-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200820183950.13109-1-vsementsov@virtuozzo.com> References: <20200820183950.13109-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM4PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:200:89::13) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from kvm.sw.ru (185.215.60.171) by AM4PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:200:89::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25 via Frontend Transport; Thu, 20 Aug 2020 18:40:10 +0000 X-Mailer: git-send-email 2.21.3 X-Originating-IP: [185.215.60.171] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 90df6ed8-59b8-4644-1c58-08d845387829 X-MS-TrafficTypeDiagnostic: AM6PR08MB3032: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:510; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: awraZRy1c67R5BxkaMQ1IMCfcrb2qeYsuhDTljwm63Q+SnYpEffjY4XrjVgn6DNF/ghHxPAGW1F40XDLz5wLVb8YgQeCPK6MuYUEHVStUxGJ9fzTfSg++LcNxNlp1Cqk8fpBEe9rZ/K5zKt5o3u9it9WihMsgRLIcykDiN5Dem88Eyecvfy9zFwrQhEdEB7yZIpJtDkV+60IPJQVesl4H7tYJwxzuTXD9Vj0ZUSQoAvRFWq6hTlAWl0HxM/Dh6BWOuxeFcPvl3LBt6lUQLSA8BQLCncQcn5QDjXqTEPMn9Z0Khi5JmQd3QJTR+MFUA222IQuGMVEc/ucppQdL3vCHA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39840400004)(376002)(346002)(396003)(136003)(4326008)(6666004)(8676002)(16526019)(186003)(26005)(316002)(107886003)(6486002)(83380400001)(36756003)(86362001)(2906002)(15650500001)(478600001)(6916009)(5660300002)(8936002)(66946007)(66476007)(66556008)(6506007)(1076003)(6512007)(956004)(2616005)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: DbC/IL9zJB2MPQ30KUB/KXOIzaftTP9eair5tdLHudmdDpwr/rt8pJeEGYE8VGxFVsRhzO1vsKiEcE7NIq0Gjvtv+isf5mcAvSjdMw9S/a1lcbN881ybl/oJTj0t2JYQqv2aJIqDzpT09GK+PYg74FrD+ZyQ7hZeZCjRlnqK4aKOQGpYrBm5M5zoEx2SbhdQAgzz3lp1meXBVuQq4pp6re8tWR3tvJeQTUYc9DyrIFKKaNKPyHC4l9N5RB+ITvf8R01N9fiI1JfPhPToE4HgA4C22hsBOLk+XcJy3gSPJP0Ma3KSuUj3rcUtSBP9iyzOjJ8zCkpgLABpOYHj9F6l4ZmF1+VlWW7il09XXhzyhrVTMnsOLxPSAJCGaU7+Fhfm1rLWoqVP4phx1Yi0++HWFeXTGUoabgPbMxdmNXVwhrf5lf0Ly2m1ctewd74k4D4xFK+8M4sTM8znemxBajRrjoT0CPKKAtg2T7X+0Lx9UM+WeqxWSz57E3UMOH6PgZwd2VRMS1HKCZQdxBMSzHBBNLxi4QoHBPqQu75jT3MfTiifLb5hzVaENVCbRUo+XQPG9aH4lTIz/PUMoGeWh4q5vDlXV63Wdm+gzkfjZjhk6z8TyHWzv72OC8KhpS/pmPHaAUXrvitjub3JVH4FfuFwfw== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 90df6ed8-59b8-4644-1c58-08d845387829 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2020 18:40:11.1172 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dpXkWQif/u26LvoiQup6f9CxphmVCv5ne59Z4gFYtbZVtw9e2xK/Z0poqVh06nJsiR+iFcRzSPEcAhX3OZttRWjmj/yLMD7+lODFOmgmhrk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3032 Received-SPF: pass client-ip=40.107.0.105; envelope-from=vsementsov@virtuozzo.com; helo=EUR02-AM5-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 14:40:09 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add python notrun-helper similar to _check_o_direct for bash tests. To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/iotests.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 717b5b652c..369e9918b4 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -1083,6 +1083,12 @@ def _verify_aio_mode(supported_aio_modes: Sequence[str] = ()) -> None: if supported_aio_modes and (aiomode not in supported_aio_modes): notrun('not suitable for this aio mode: %s' % aiomode) +def verify_o_direct() -> None: + with FilePath('test_o_direct') as f: + qemu_img_create('-f', 'raw', f, '1M') + if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', '-c', 'quit', f): + notrun(f'file system at {test_dir} does not support O_DIRECT') + def supports_quorum(): return 'quorum' in qemu_img_pipe('--help') From patchwork Thu Aug 20 18:39:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 275973 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B27CC433E1 for ; Thu, 20 Aug 2020 18:52:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA5062087D for ; Thu, 20 Aug 2020 18:52:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="a3jsXGrv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA5062087D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8pfa-0007Tq-9a for qemu-devel@archiver.kernel.org; Thu, 20 Aug 2020 14:52:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8pUL-00018y-8Y; Thu, 20 Aug 2020 14:40:37 -0400 Received: from mail-eopbgr00104.outbound.protection.outlook.com ([40.107.0.104]:1630 helo=EUR02-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8pUI-0003CQ-0t; Thu, 20 Aug 2020 14:40:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W7nchhQnwCJd8Sg0hF9NkV1z1uFxM8vxbFz2y7gDWHFjklr83fCDQl1H9sreJ8h9zcUQ+U5S8Zti4/orIyhKvj5cnNto9lCqFxMCvm4Mj7sv14y71Le9r4Qz2T2eclsxpd/e4YscfCu2IvSDQHPnUlnlI+tUUnEbElSAAahC773TfDWl/NG50C9h5OlyAFo8OGFCDw93uIv/nMT72Nv+suJlne3wWXRfArTEOh37P1bWYSk3oJXB9uhI4W2MAx2z2or1uLDNymHh0D7x6urgvoGn8c54rLv0vesWpszy3FiuN8IAKj/GBnYE9Lum2NG9o7YCgneFwo6BRNJ5YMmhDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z1hZ5wjEyfzVH8D25IXioGcJE35tviOlYq6iYGJ+Suc=; b=fuy8foXbUc1GnTSoctE5MMVM78vKzJHEHNnDiaHoyXVaHjn4wbwC0MX26YEI2eT+6Txw4VyFUMjwpQYYMZ/hKQuQK3guK6qSpjdueVo5aJs/xjiKDAwcESStmjhlukce76Wr4LlL4sIxnDvjrH0DXpmewI/PgIDvSdiWzONYwAHimMBFRALzO9Qc5rivs0k6U4oXu+9Q4v6zD/QWvUiL1DsZ0xC7m0OEBBrq/6Itt0m19l1QkXfSth8KIeLxAZuog80OPf3UCB7xrIZgzQIAG7bIQIFvN1ndbUTfDzpoRHn47ytx46gTZmDuq3iD+VlvK/AF9JLsminJAssGxiUC/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z1hZ5wjEyfzVH8D25IXioGcJE35tviOlYq6iYGJ+Suc=; b=a3jsXGrvd2Wxo4VH6IIIq4F51BksiwADVFW5WCAFNq0ilYEG7Fk3VFt/ackSQ7V1FRW90ym4QOiCo2MPuyNQCSusotUsq7AIdJ5ey6Gv6y/gH7aBs2pR/1Fg+U9XwS1fFIKUsg/mA8a/YCHR8CLasi056WM9/t4HPt2ZuQYj+hg= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB3032.eurprd08.prod.outlook.com (2603:10a6:209:43::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25; Thu, 20 Aug 2020 18:40:12 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a%3]) with mapi id 15.20.3283.027; Thu, 20 Aug 2020 18:40:12 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v4 09/10] iotests.py: add filter_img_check Date: Thu, 20 Aug 2020 21:39:49 +0300 Message-Id: <20200820183950.13109-10-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200820183950.13109-1-vsementsov@virtuozzo.com> References: <20200820183950.13109-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM4PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:200:89::13) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from kvm.sw.ru (185.215.60.171) by AM4PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:200:89::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25 via Frontend Transport; Thu, 20 Aug 2020 18:40:11 +0000 X-Mailer: git-send-email 2.21.3 X-Originating-IP: [185.215.60.171] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b34768db-766d-4f3a-6e3f-08d8453878ad X-MS-TrafficTypeDiagnostic: AM6PR08MB3032: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:393; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3vXt3vco1pmk6R2jVp3rOWUkFj/NAyA+FRK3kkXx4eZxXm1BBunoAjhzB3tUes5fK5TfQZjb+ZNqotH5kG0INONh0+RAHfZgw9Dcf7d698Ej8DDFv4YxGM4WWVE5rNaahQtEmOIvNjC+irmfXjmObRFs976eSc+L2B/a8M6MMkEcSdda8oVqgEr2O7+3s6LMNkFSMPJ3tDNnsmqPznH/vvYk8wnqmjtzR7zlQM7P1L1lMkMMq+hh1077Xt4NN+Zn0qpfaOmCmIVQfC34z9q4EfzjaJqseFTvAuzqu4ipha6KcWPync6+yZv2pFoEonZAagyg5c6AYyHtR6DKaewsoA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39840400004)(376002)(346002)(396003)(136003)(4326008)(6666004)(8676002)(16526019)(186003)(26005)(316002)(107886003)(6486002)(36756003)(86362001)(2906002)(478600001)(6916009)(4744005)(5660300002)(8936002)(66946007)(66476007)(66556008)(6506007)(1076003)(6512007)(956004)(2616005)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: ZNhrpE/g10yXCvwERZROHDnxpM5auiIn/D7Ato0QZV2Ume9vB+K9CdDDKV8LyiyoluOwa645/pkC96wEv+m+fPvoaDqA848eWb0WJrFIJHUwb4P4SQH+qyiTkZjsRgkrqxyA/tDgn3FoDctZZOJhwyzJ4fwhikYD0Wy9DJIm537xMTjiK6RC72ciO5TSMWMfOqdhPYMGTH22q07gYCFVXN9SP/91+0t0Nq/iZ476rrgIX+HnWhTQUxvbxlrXGvhIhCVYKHPKNlUO87eHoRpeg0WPf3RMJb+0dD//EAR6j9r11K6+v7B2A46iROdsI2lr7lxzazD4g547IUapHkYA5SQNt+8c7aoiWKLaCw5XQlxl7CdhvoRlu+xj6F5jni2P66LeO89IcdMpvNhE1m874Y2fhmrxCuwQOvXS2zf+H6iYHBsvYQD18fmf46pMwVSBNttMmVxzKKeFh/ybdkQWU/JqQjvNxR4hSBYm6Kylk8KOv8eDuJYNnOeFX4ybqaXZlva5f2APYeiZMNHiEVDugVFEMf5JpxjcjA8W7RwyIaWFrQvlkl3ZGZ3MaqCUFIEe45DhjkxqE99UFMYqN4sivN1f9PdiurmuYOgkZb44E5XqYuxmKwHpV5968CXEeYbN66ODOcks8b2uV8lw324HWQ== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b34768db-766d-4f3a-6e3f-08d8453878ad X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2020 18:40:12.0361 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: z9ltQVQ7vDpK5APSmJiDgWWEUUA6PPXejNrhHM1Ce6ZEuDXhMW7pT1O1Nc5Pd1RCgMOmtYN2ArkdTd7TdfOX/sihmSv7rEkNExEyflZ9J6Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3032 Received-SPF: pass client-ip=40.107.0.104; envelope-from=vsementsov@virtuozzo.com; helo=EUR02-AM5-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 14:40:13 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add analog of bash _filter_qemu_img_check to python framework. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/iotests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 369e9918b4..ef3da4ee61 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -402,6 +402,10 @@ def filter_img_info(output, filename): lines.append(line) return '\n'.join(lines) +def filter_img_check(msg): + msg = re.sub(r'.*allocated.*fragmented.*compressed clusters', '', msg) + return re.sub(r'Image end offset: [0-9]+', '', msg).strip() + def filter_imgfmt(msg): return msg.replace(imgfmt, 'IMGFMT')