From patchwork Thu Jun 1 15:14:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9759877 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 E901660375 for ; Thu, 1 Jun 2017 15:28:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8A30284F8 for ; Thu, 1 Jun 2017 15:28:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC3C9284FE; Thu, 1 Jun 2017 15:28:07 +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 E6025284F8 for ; Thu, 1 Jun 2017 15:28:06 +0000 (UTC) Received: from localhost ([::1]:45236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGS18-0001wW-1H for patchwork-qemu-devel@patchwork.kernel.org; Thu, 01 Jun 2017 11:28:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGRom-0000T5-Cn for qemu-devel@nongnu.org; Thu, 01 Jun 2017 11:15:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGRok-0004o4-Ek for qemu-devel@nongnu.org; Thu, 01 Jun 2017 11:15:20 -0400 Received: from mail-db5eur01on0122.outbound.protection.outlook.com ([104.47.2.122]:10425 helo=EUR01-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 1dGRok-0004n4-5r for qemu-devel@nongnu.org; Thu, 01 Jun 2017 11:15:18 -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=2Ykqb5I4zUzCtBr/p19hhi9EwRzHwGeKM5ugNlACbCs=; b=BKoeOvPQy1Bn8DdLqzYebIdyp2ZleMLV4LJEu+yfWsixXCjsSaNrJ8aMI9CUhmmP6IyYi4Ljt7KNCPgsjE2AeT0KlU4mmxfCnxK4QFS4zYhbtWeOQetdYTjgpUe7R54mxeUsyx9EkCuU6OPEPYst9ZWJ1C0weEOvzbHEf7y2OZk= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by VI1PR0801MB1999.eurprd08.prod.outlook.com (2603:10a6:800:8a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Thu, 1 Jun 2017 15:15:15 +0000 From: Anton Nefedov To: Date: Thu, 1 Jun 2017 18:14:33 +0300 Message-ID: <1496330073-51338-16-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496330073-51338-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1496330073-51338-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR1001CA0005.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:b7::15) To VI1PR0801MB1999.eurprd08.prod.outlook.com (2603:10a6:800:8a::20) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0801MB1999: X-MS-Office365-Filtering-Correlation-Id: 6f467a54-532a-4e78-cd38-08d4a901021f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:VI1PR0801MB1999; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1999; 3:KD4EGqALTw6cUKqpJFEgOEofQMegXefIm8rLCkeR+8kWBpQiz8JDLmwzKglqoonlwY9a+vJ9+Vvc5GjKxtj15DjmnkJtTopsfKPLeZf6IN/P9/MOMHxx0KMkIl/aa1b8Zhla6fvXpxD3u2er3idCRE9WSfJhpXNEQ8Q5vNnH44lVOiMSB5Fwj3LSbnSiln+QUy87RapVjaENn6EzCHGWzi9HYE+yqheo6wZYSv9dFytBK9E07f+hQz29Ck56GNFRYkVu1OdfMdoxEb3EeXo1ttToDlyHxOUCLrExFxBEIXehm5N9Mn/1m+ngH9F+vDyO3bIVRGvr8uBqOlQGh0vfXA==; 25:t7GJwi6VDSBHLGrDXc6pzH2PnHRYu+DoTLRyDiNbZCYUhlqdtsSHCA5MsyePAcy6KtRj5DzqizojPTix77cJntsLStqAx/9yVcvAYn9d6iDGipbro8/ysXOZ0kBcp22KK/YBHiK/rX4ZoKgIbnywQ5GxgzyaTiNxZOsqVoBZqWQf81uGyPXemhx9+TmvLVuYaXYvdi5tx6bVabaZNBSbXolTM/Df/ElTNJJYXeFchqAHnFYfll2xbuJrzBSQFBXVx20WhNZBpm9IfJMo0rdnp/BydLRnRK3c8g8ma9S/Z3rwXztXjDX/J7wNaLx3wtNkUmQj3guSM/G9n7FYcZFZQETh6TAzkOC7mMehIDcvIHFGx3l5I/hI0yrPSWm6tXh/FfMegr6r51ctj2JPf1sHPzNIaTvv8eMZr5H7AtKBtVBcW1NYMulTIdWl/3tAQ6pZgQ5Jjey3DRvzhVuYeEh3knR+Upm+nAlMlyouyFwq2XQ= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1999; 31:1q/g3X61cHOYvHmJ7EE80BseEAQcvhZyfUxeOkaFxHYtR16oYYR1PelLvr8unFS4M+maFvdvYu1pmRC/fqPuEp+UuQ98Kku8XKg0pXXSYPTbveN4EiymEwVbI+i33kZh1oA4z9XsfJTZqjz5juTZl3Pt+f2DkkTc6UBCd04XTXSEjA1jsAA+iBSUIIDqwYqM4x2TebN1IVfOaVx0Dx5eA/LT6L52IBsUvZNyNlfTkXI=; 20:vKbNPFAROOF2MlIuQ3saePiI7xPpI3XENxPWmSypzqFwTrN5dci9RMOsE4ZAb8MRxTUOW2x8ZE1ETxvehJUBnUOX2krryZBULg0ISnFttT7ihJgLodAtkUKFi7+3NQd03RGU8KxzcS7ZiJP/McOPZVPP8g0rhdcv5hrCmEAPREq1YFxnzCJjmwE2Cgw2h20hnNhamGh1E4clBMwUvPJmcOnHEZnchYq75Nmqjs93TjWPUxFDVeENiX8g2+awbXdu/AOkDOX7mc8ygYCYdSupRTxzCPjoNYFpvjY7aw+O1MbNiHtRT/h9Wv2ws5MgHy/l593f+CNbK97U0bauAqbwyW6Kh7sKQm8H+5AdL7MBVUlj768yNIcLrrNcaGB2J3WWOzwQz6elKJkWY98gdBmhPmc6PRKSudmOzU+wxeWOECg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123560025)(20161123558100)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0801MB1999; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0801MB1999; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1999; 4:qkHZDKoilXz/nrMdlaRIvhFHYio9xh7wh1gxlzd3?= =?us-ascii?Q?wecAqH2I1aHo58MRTQ4UggIJRlLZifvx96o1XY643gqD8xjhX3Mj+lQGkElA?= =?us-ascii?Q?rj9xV71FRzAroSj8K8k5pwQ0LLDPbTZTEW7fFFkX/e1qsnKIarFWbhZCK64a?= =?us-ascii?Q?gvnCGEZq2MdKzesY3FZYRDSHEhjEMjcQzq3Ie4mxLnVtm4pZTm/S/lQB2hqI?= =?us-ascii?Q?Au1maUWnRjY/5dz3dmNmi5ooOMdMDr+4Louoq3tnRtuFYetscgJY/qSmSQZV?= =?us-ascii?Q?L2Wldj/R1hL37nrNTNmzi2v0yoCDopL+LVtZj1zRPcSUVflt6plFYRptey17?= =?us-ascii?Q?tw9ozmxAfyWja4u/YvdTT+5RESBxiRYkMzxq5MWRbZR7HaiSKfVfjQsYdY52?= =?us-ascii?Q?wYZq2qtzMMfsK+x0lYwqJ454PQKLQBfgCQ/4yuNwXUJoGnwB8Q8a0HFAV7eD?= =?us-ascii?Q?nG/PRre58yAQnR/JtAshbIYRp7gL0ipZQ7X4GbFhxdf+BR877aagDATUP8/e?= =?us-ascii?Q?qWudPqZqeYhS9d9sYUkUD0Ol/sOFgnGwvT7qdDcPcTYvjjMW0rrzXuQKAjvS?= =?us-ascii?Q?Xg8uoKpqvW/lE6hYgt7IPV9ol0NBsKkBfcEel5DIaa7+e8Y3Im9QBy22E5+3?= =?us-ascii?Q?WqEhMYciSBAtpLESpVcZ6LEHAcmKmNd3mx+Cbu4pDotZ4mZXqWSqs3PzTC1v?= =?us-ascii?Q?l4nAIUzzeyTLCIoL9O4n9aTtZYY+3yw6XiqYvQKJbARxj3TPwifqx0wcUNDJ?= =?us-ascii?Q?3yrAEsL073Gz31uzLW2CgoYqz2KzmNBYIrt7Ky03u2esZpsgRx56cOmvdVvk?= =?us-ascii?Q?sYkxslgsvJWMUZ4ff+j7Dc9ZLKJc8GzktWUn0DYWzN6CrMbz9N7t5QwQy6bV?= =?us-ascii?Q?Ef2AG+tb3QgXFtRcJc+bLA62KoeAIoDGXju0X7YI8YUZi47qamMKAJXt3Z58?= =?us-ascii?Q?yOyZJU34kQO9ZDfBw7Qz6Lh8GONQpInzkrKYw7QtVCWAJSqc3W4IICtczNH3?= =?us-ascii?Q?8Hh9dc8j58QgpqO/md+x9y54+N8gfqL0HcVCrZwkxqpJ1y0s1d3UQATGry0Y?= =?us-ascii?Q?mm6Z9Tq2Io/1XlwI+XEJA3MC+JtzS+aAwFCCGt5LO2NZUAhTbW3bhNhtTWy9?= =?us-ascii?Q?e+Bo7ZHWE9Gs/aVjDsGwEdP4QXTrxVXr?= X-Forefront-PRVS: 0325F6C77B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39830400002)(39450400003)(39400400002)(6916009)(6666003)(6486002)(7736002)(478600001)(5660300001)(305945005)(54906002)(53936002)(4326008)(6512007)(6506006)(2950100002)(110136004)(107886003)(3846002)(50226002)(8676002)(66066001)(42186005)(81166006)(38730400002)(25786009)(6116002)(76176999)(50986999)(47776003)(86362001)(5003940100001)(2906002)(2351001)(36756003)(48376002)(50466002)(33646002)(53416004)(189998001)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB1999; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1999; 23:l3KqjOUaqRpIYm9qNPt7v5cZ0pMcR74rKO+N2Oz?= =?us-ascii?Q?mYhX28DXMuG8jGF1z4N+8C8zG6zT/tFAIgd94VXrZG5oryIOQL4AQO2DezRd?= =?us-ascii?Q?e6g62o5FVACkTxM/yfzVCQQW+MGb4J90vUhInv+Tu7zdr8BMy8o8Z9Fh0U69?= =?us-ascii?Q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myDC9VR17mL1Tm1g2iYvJbhWGZt67fnOlHNFlY3xzABazzREVIE3PvSUl/bSVL1dRwZuwOzqq4tgcO50tTePGtfsv2f21mj0bosuHkBw7H8H1q; 24:tu4VHVvwB8fRRg1Zfc4ey+dfA/cCaeH/bMjhXMsmUEfA5EXg9LFq34IFauU3glk8qWNoF5YBcQAcfo7LEch+93jI7r1Yc5QAmtTTJdr3EAk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1999; 7:sZa97Xl0syy889ZJ/hzw1J5GAbweXFq+hlaZ6XiQMQpvUvGDyHMk12Gb8C6g/CPQUMZa0/3+DOkDj8ub70hECPNu9wQn/ZpwoovYVbzcPFmhCi/cgFnZ1zNAUQu84Vy8KhnUENvrEdRuykquiFpBvX18+wimxsw1cUoQZh9Mkf5B37pL2ljO7Yas++psix/MM87ioPMyMH4JHzcivF3+sSg9y8sPwH82x/EKBtguiRTj03+pAFci8VA3d9K+a9Hxo63Zl2vH8SZZAwszwGU5k1fbqm3TEO590xErUmcuCApJaNy5pY0rf50TnEZ3t+U7n0LcdCttYXznOPfAkPtjTg==; 20:KnYOC2zS8Up9SaMhg/h5I+LRGuKV+6GhAOO3BBAf90dXFUO5srIV/6vIqUyEjVobzRlROE2ge8W/wDpYGpn+Bg+5Lq7ilSZcPmwDAT20QJIAqlZ0VT8VdSLp4GiZDcAife5GDdD644XU4ozKazq43QB1ZkYmHBhEMZ8D4NXsijA= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2017 15:15:15.2251 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1999 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.122 Subject: [Qemu-devel] [PATCH v2 15/15] iotest 046: test simultaneous cluster write error case 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 , den@virtuozzo.com, 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 --- tests/qemu-iotests/046 | 38 +++++++++++++++++++++++++++++++++++++- tests/qemu-iotests/046.out | 23 +++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046 index f2ebecf..c210b55 100755 --- a/tests/qemu-iotests/046 +++ b/tests/qemu-iotests/046 @@ -29,7 +29,8 @@ status=1 # failure is the default! _cleanup() { - _cleanup_test_img + _cleanup_test_img + rm "$TEST_DIR/blkdebug.conf" } trap "_cleanup; exit \$status" 0 1 2 3 15 @@ -188,6 +189,37 @@ overlay_io | $QEMU_IO blkdebug::"$TEST_IMG" | _filter_qemu_io |\ sed -e 's/bytes at offset [0-9]*/bytes at offset XXX/g' echo +echo "== Concurrency error case ==" + +# 1. 1st request allocated the cluster, stop before it writes and updates L2 +# 2. 2nd request starts at the same cluster must complete write and start +# waiting for the 1st to update L2 +# 3. Resume the 1st request to make it fail (injected error) +# 4. 2nd request must wake and fail as well +# 1 cluster will end up leaked +cat > "$TEST_DIR/blkdebug.conf" <