Message ID | 1495186480-114192-10-git-send-email-anton.nefedov@virtuozzo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> 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 295976034C for <patchwork-qemu-devel@patchwork.kernel.org>; Fri, 19 May 2017 09:36:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AA6A288A4 for <patchwork-qemu-devel@patchwork.kernel.org>; Fri, 19 May 2017 09:36:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F328288EC; Fri, 19 May 2017 09:36:51 +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 8E89C288A4 for <patchwork-qemu-devel@patchwork.kernel.org>; Fri, 19 May 2017 09:36:50 +0000 (UTC) Received: from localhost ([::1]:57476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1dBeL3-0006rq-I0 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 May 2017 05:36:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <anton.nefedov@virtuozzo.com>) id 1dBeJg-0006q3-E5 for qemu-devel@nongnu.org; Fri, 19 May 2017 05:35:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <anton.nefedov@virtuozzo.com>) id 1dBeJc-0006oP-IJ for qemu-devel@nongnu.org; Fri, 19 May 2017 05:35:24 -0400 Received: from mail-db5eur01on0105.outbound.protection.outlook.com ([104.47.2.105]:42544 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 <anton.nefedov@virtuozzo.com>) id 1dBeJc-0006o5-8m for qemu-devel@nongnu.org; Fri, 19 May 2017 05:35:20 -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=ejzyeO/YFLrWyCRcHX8at8kuzPss1SXhQZDM7iJPqkc=; b=ZBoJAps1XbUb0sNerPDwM9UDR1tVwraQ3AeHwSksQ9v3sxP0l92Sy7F/TWr54fLd1CfCjUj8XmzwdRMPYwWL9a+44EZ+Tqlf127xDzr4Sq9GJ9Guynbya2+FmUJzd7N1JmUK2Ljhxh8yd1Ud9xPTmP5y/EtdZf1rAFOtpGo5kFI= 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 AM5PR0801MB1988.eurprd08.prod.outlook.com (2603:10a6:203:4b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Fri, 19 May 2017 09:35:17 +0000 From: Anton Nefedov <anton.nefedov@virtuozzo.com> To: <qemu-devel@nongnu.org> Date: Fri, 19 May 2017 12:34:36 +0300 Message-ID: <1495186480-114192-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1495186480-114192-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1495186480-114192-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR09CA0073.eurprd09.prod.outlook.com (2603:10a6:7:3d::17) To AM5PR0801MB1988.eurprd08.prod.outlook.com (2603:10a6:203:4b::15) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM5PR0801MB1988: X-MS-Office365-Filtering-Correlation-Id: 6d7159a4-4730-4319-1796-08d49e9a5ca6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:AM5PR0801MB1988; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 3:b44YDQuy7pgYATdx4NMehlbtew2veNgWfZSvaucZ9tBAOhQ6pYEFi1uauza2VHAW7JNyPhpLXtGChPp/WImM8TqTuBWTwh/PlgFjbQ4s3lfhxzziA9FsQNR/XcT0DZ8EGBEwNeRueh203KQe/OgRWBGJgD4YZMDw2DnKzXBhubROWadtTMkFYakhrHZ6+lVLRE5O/TJRPGzKyGVW4Y3YqTEf/AXAoBvH1fMBPHRLsXXjMKku9u8NUhltt1IdULWjZ+xuWu7swUVVs+7F+I2DaDpV1K1Fcvs5eZ2XR7A5IX5VaonRx9C4Qjmu/GIraV+uiPpG3iJKUxOBS+91oKi1pw==; 25:lQAGP91t/YVs+guJm5H+ooxQC2wIedq3EEb5A0e7ZLvHbTHLvhBsBQvRORsoLHaX4OMqt95UeHN7p/HWH4rXEG/83TUNHqzMKKiMPYOEUKzBc/nCORw75tUG2q9GKDnOsVPHMFb3f0eKO+ROu5sBSPed006zOTbQrBU8dcTk821b9OQeBYc7M/pmcyWDm8/391h9dGh/HFcqtPOYM0AWPbn2TTRk6qtydFQM0sd7bZCKNJUY6zK3xeIf7VjiBLcEFnHBSLBys16KQFjV4Vj0WApZWzT67c+KAULEIgDTXPHbMplPf14uz7rKeJLZb5XIO7zcNHaIScMYP/vDP4QZNTw8fTHBcfSZKGeUfaZ7xwIqyzc3XyBo2kBGZjl/CYTCkqR0k72lBCsAm/UFGfxiWzln4nfcrzvS5wK6GodTFJXr4IWc0bkNfyuHnd9CHOLBe1RXMGiD2SpB86v43HjaTLh2uL1et09RZVy7mi4VfEc= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 31:IzVSAGctXFzybAoDX/ORqE+OcDoFM4TQnLjd/QJtA0NHd78r7cIZC1mSoWxf8UEmkPj26nV4GNT+Lksdc1XQmgkalnD6HoLlovIIB/j0epHWVijZ2+TdxQpEzd/NeVrE9XhN7GQu3ppBWKZJYFhZDRtoc2Ygsv+y+mSjjDIzBafcS2CZ0714onDc3M9DKoZiydLAc9YlQARrR0Fb7K/aMQq7iy2SzURI+5wZ31wZWB4=; 20:XVKMJK5yktL3p2jcD7CdH1XDe3O0UUTVOfn57bVe9lar7vgVN4RM4nYao6Z4mCIlUUZmsx7/eFb2PTd4rvQAx0vrMhVTh4u79+qc04ua31mcuCC1Cm4sos7MdNSBP4+BakEJyFE8klFGS02ZQIH+jJCXmiVigZdGUZknkkjkznBwtT4zZW+xers2aoVNYQXnCq+Kj0UUcahXApVDc2AvVH2To/TTqJrwY0vzPpTntsf7ZtC+HCFseb+j0D/LAomPwm+yvSk07B/1wS/4neiI7jJ0UisUjrc/yCf6We0ytjNmIMIdJ0iOO0PGINK4Fl/qOkKI28IZIryOzW/r8qWzM8aZpS4XfIRNUMoQKr6r78RR13SHblqQyy9u2Eyqmyzs/EUAivpdLDK87NiFgczR9IeJz42MGgW46OW9d4mMG3Q= X-Microsoft-Antispam-PRVS: <AM5PR0801MB19888E9A5BFEF59A8159FF1CF8E50@AM5PR0801MB1988.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(6041248)(20161123555025)(20161123558100)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:AM5PR0801MB1988; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0801MB1988; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 4:hOaaAxTCLWr0diZd9+RznKjIUJN5x06HnaCv+f9Wca3+Vrlg2b0DS2h+i0bU47SeIuiuMuI3vnUPFillx1nG0qIrPdHuPevZh514cEJS5pcVBLiSbTVH/CThpgG4w4BMkOfOyV9PeJ5jgoE5YdbyMZh2rhjXmNnNJw6HWNu/bWvVAK0bwILcE3zrMfHld5hEdftSPujTX5MeOnO7EoO0YO95hvRDbxqnaoZfIRovX8K+1MNB5EIUmDxP8WT6HF+oin8zR6laipgckNjHuDde7Mwj+uQQ81gXkxrtUptMiuuDD2w5fS140kJcFRSiwZjiLYB2BrZI2fOUn0A5jSPwFJiHLOlkPVd8XO/oUj5PhCOqefNGfbj6UEGqgALyOEGxZ17VU6+cuNF6VtOBnjoMyVMfODJ54IMWrIdBTSS3ba52R+i/jiC/ox0UKPFMjjmMtjPjPVyrAFubntgG4pp+4igSTHehQTjTbaTbptDY7vhTq47kLxASfOpDBaGGzEeJgrG4za428ZsCxRKTdSKjv3dTldMLGdHYXgU+P5c32KV4ccI3q33n8rmwf0Ex9TIQYblqEz1WdjKQBXeahEWIZZpYPBtbptnkL5G228quj9B4Yil621e+GZWXKVC2/P7ObL2pStjMZcuN8gTDkAZMT3KRHKPQd177KjUVirEO1eZQ2326pJK4Qm3GB+C7Znwfc2bn+OhEZww8EeHrfwYSvUPknUGw966i+kqV+t7bjLOLN+Uu4CcbgfD0OoxoCZOOWF1Euz9kvZG/sQrWmRaqqJSmGZHy0TPqARG1fcmq7FU= X-Forefront-PRVS: 031257FE13 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(48376002)(8676002)(7736002)(81166006)(53416004)(305945005)(50226002)(33646002)(5003940100001)(42186005)(3846002)(4326008)(25786009)(66066001)(189998001)(50466002)(2351001)(2906002)(478600001)(6486002)(6506006)(50986999)(6512007)(54906002)(36756003)(5660300001)(86362001)(53936002)(2950100002)(110136004)(6666003)(6916009)(107886003)(38730400002)(76176999); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1988; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1988; 23:wekz7tXUVCOGHleRsKWkoSaBsXA7HoYljtNL7s3?= =?us-ascii?Q?fwxJcd3HyGSnMjXmbRaYbq6fsDAs5hzGN6mtYy89g9kP2g/UUf00m5+nP50C?= =?us-ascii?Q?nvRcu0X4ghoP24r8xONMrX2aPuHF13hORwH17m2EmzAGIb3erIqbcVcpCiX+?= =?us-ascii?Q?NvIWKTkK5fqTBl1uL3HzKdtsxeQsgsN2002uqn03D3lM5KnrXOwCtTswnP/3?= =?us-ascii?Q?wy1YMd1AT8ZjvdQrZ2cfR/djbOzHyV6BTi+QMzBqY6iCjrw581axBBX/7FCb?= =?us-ascii?Q?2jIMlcZM0S+WToHmx34wfLJNvup6qQiwEhR7AYv9G47zD8shvBF5Cs9RUpDi?= =?us-ascii?Q?5V0Yx6iaUtpFdLVNNSo+onpOpQNRwHJm9CvDUQ3Nmb/a0XJjTppIXWIXiJu5?= =?us-ascii?Q?T2Izo9IF2pEMNVvbtlGr77h4n45+TuzoM+2Em+0yY8INhZkac5clm1By/j3R?= =?us-ascii?Q?ZxZu/H4v2vitSPPmdFVi4EOs/T/JFpGHmDj9lsEj6ak8+M+qNtreZuPR0tTl?= =?us-ascii?Q?7smx6ST0fsOmU72pgNmqZuVnHIB19DUc7izviyX9k/YBY9MD9JlUrzmoYwRC?= =?us-ascii?Q?l3LdXLz0v6mt+8jOxEpRGDKMqvAGTiHZ9Q3qBKdXr0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vLn0q0P6zuOmPfPFSw==; 5:5/B9B25dKoFPtWbovWRVEI5sZV+mzdM6mhb3f7KqqwasFVPUgt+2i7+hNloXGOqGSgyiS9IKTwxkaZFjz4YCp75X5OEddYMR0rHMNd+8iVWMEufxm0vbb/XiUWBT84S8k7rWm6ywtql1OoC/qe/p6g==; 24:RmjUHcQUc24A8MZ+xQhqoredjty+ZN1VvJ8ojuApumsFk9/Qpr5QHPpfqHt7J+GuxrDJYgtEmWkUFlp0OSlUfouPTuw9PpUgRt4GaIWbBjY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 7:IMjG9sp3/LEZzXFEu1nfxR0bdRMz/K6lB48JFky08LPXh4tzJDRvIGCN/MYNGJDyu1StWiKuMK/q0yjnSo/uMJv3KwubQxsTLO5+s2LEoefYBpHX6PGyVtrXBIBwGy9O7RkOllyB+Yt+mB5vNwF+seZpgN2lHPGV5us4UZ6Ld1q5zGGBA6DyYXs1jEej+Fkpb3Uaw6Go9aa1khe29SF1ubrQ9AvpD5jLwzKbUK0mFtmPmJQpkrPfUcXCxhxEoH1mE9C+6/c9YFdDW77lYljto/OBeVYIgc20cRNM2fr/+GxI1hLcvwi5iCrVovhqYrJgTGms9vV1IDOFDzGC/iYTwQ==; 20:/7DbnuaUBx7JA8I+/C7gep99oK1B+8V7oLwag1HmhFIahuamhpRa8lQs1Bnj1mr4yL2RjiVWmXZAhVO+VzIgkLgWe5KtN/Y/kIfBBFqYRPEtRpB/H6NrtS+RHByzKLiAD26pCHWJKMBBKZu1O43zTYaGlxqhlmV/Jfritbw2yxw= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2017 09:35:17.5807 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1988 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.105 Subject: [Qemu-devel] [PATCH v1 09/13] qcow2: fix misleading comment about L2 linking X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: kwolf@redhat.com, "Denis V . Lunev" <den@openvz.org>, Anton Nefedov <anton.nefedov@virtuozzo.com>, den@virtuozzo.com, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 25210cd..4204db9 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -827,12 +827,10 @@ int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m) assert(l2_index + m->nb_clusters <= s->l2_size); for (i = 0; i < m->nb_clusters; i++) { - /* if two concurrent writes happen to the same unallocated cluster - * each write allocates separate cluster and writes data concurrently. - * The first one to complete updates l2 table with pointer to its - * cluster the second one has to do RMW (which is done above by - * perform_cow()), update l2 table with its cluster pointer and free - * old cluster. This is what this loop does */ + /* handle_dependencies() protects from normal cluster allocation + * collision; still L2 entry might be !0 in case of zero or compressed + * cluster reusage or writing over the snapshot + */ if (l2_table[l2_index + i] != 0) { old_cluster[j++] = l2_table[l2_index + i]; }