Message ID | 1528911866-37489-6-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 D84AE60532 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 13 Jun 2018 17:48:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2B4628F2A for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 13 Jun 2018 17:48:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B244E28F1E; Wed, 13 Jun 2018 17:48: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=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, 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 2B80529052 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 13 Jun 2018 17:47:26 +0000 (UTC) Received: from localhost ([::1]:35962 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 1fT9rh-0004fi-AC for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 Jun 2018 13:47:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <anton.nefedov@virtuozzo.com>) id 1fT9pG-0003LG-2k for qemu-devel@nongnu.org; Wed, 13 Jun 2018 13:44:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <anton.nefedov@virtuozzo.com>) id 1fT9pF-000787-4y for qemu-devel@nongnu.org; Wed, 13 Jun 2018 13:44:54 -0400 Received: from mail-eopbgr10138.outbound.protection.outlook.com ([40.107.1.138]:47432 helo=EUR02-HE1-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 1fT9pE-0006sA-Pb; Wed, 13 Jun 2018 13:44:52 -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:X-MS-Exchange-SenderADCheck; bh=F0/siw/vLk7Z4l9n8XN4BMS9ZQyElRIUfHWfFwE1Gr8=; b=M1qg2PXu2j79F6bGsd+6HrPfaW3slBedO9p7X2zrQM/7CVP1zpJRc2hWbJRmqvBXTbjZ8UxvlqVBWokp0mqgOobPff9mLmyhDEbY2+ob7F1y5apIcQRMTdvEHUf5c1kH/EycVubVWcH30LFlqcAJDApkLQl8t/I53auszDjV2j8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by AM0PR08MB3347.eurprd08.prod.outlook.com (2603:10a6:208:5f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.16; Wed, 13 Jun 2018 17:44:50 +0000 From: Anton Nefedov <anton.nefedov@virtuozzo.com> To: qemu-devel@nongnu.org Date: Wed, 13 Jun 2018 20:44:23 +0300 Message-Id: <1528911866-37489-6-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528911866-37489-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1528911866-37489-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: HE1PR0902CA0023.eurprd09.prod.outlook.com (2603:10a6:3:e5::33) To AM0PR08MB3347.eurprd08.prod.outlook.com (2603:10a6:208:5f::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef886275-eeb9-4fef-ca65-08d5d1555d57 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB3347; X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3347; 3:MAKZfKoAr+cybUw8dLK8H8QzqMKUf+tmMjDG9w9cMGA1OmqNjmeZqXrS04v2YXwazwW5+9EFyhC4/lLj1JG8HvHzkVbvppG22x+A5gZsWoy/KzTMPIgenntk6hpevpMFAayBXD6236rIwCTCOf+eQCOlLecF2LWF8nXMwhSUdldUNbswG+IzYBGRreepuSaHEoO/trIv7mHaGyXBdyRB3vagxpdVScPazEArLjELSFFurQiHSnzHJ3q4VysG+lnB; 25:wm1x0FzJGDPgTeiCIWjYB9HfpsPFJapTCoV1RBMH9taEFiYpbKyxyIpm+UffvZgKtBs8J45vOrflxICrZmdXJ08HxE14kdE/EMmIE/NPseKhrbhH353TzOQ3+26iSBk80rk/HesEwNwJRiUofL0owMzpIzGFhhdIbl4S6xbWvJa33c2FnOK9ud5hJF3rSggb3bQjtwXgCXSxDZKXU3KObjJe3iyRs6op2fM/FL6+pT7VTwu9ruetkUliWR4S21IOgumflIJASqielu1GP1qdkMn4kdTIXs+sWJcRrEkhyCNnxS4G5ElnWt9xGAmoFAojT99Fl2t3YG38Igc0iefX3w==; 31:Q1qlWJ8vPFv4k89nEAMTiX4AmDnF5MB3llrRFApDos95oVbmDG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08MB33470188937F4E0092596B8FF87E0@AM0PR08MB3347.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM0PR08MB3347; BCL:0; PCL:0; RULEID:; SRVR:AM0PR08MB3347; X-Forefront-PRVS: 07025866F6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(396003)(346002)(376002)(39850400004)(366004)(39380400002)(199004)(189003)(50466002)(2351001)(386003)(4326008)(2361001)(59450400001)(6512007)(52116002)(105586002)(486006)(478600001)(106356001)(44832011)(53416004)(107886003)(51416003)(53936002)(76176011)(11346002)(956004)(446003)(2616005)(476003)(69596002)(6486002)(48376002)(16526019)(6506007)(7736002)(97736004)(186003)(5660300001)(6666003)(25786009)(6916009)(305945005)(8936002)(6116002)(3846002)(50226002)(66066001)(36756003)(8676002)(86362001)(47776003)(55236004)(68736007)(316002)(2906002)(16586007)(81166006)(26005)(81156014); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR08MB3347; H:xantnef-ws.sw.ru; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR08MB3347; 23:awfME1fIMsJNSx62QiMGZ1xRMa4O4o6CGfZG4I2yX?= =?us-ascii?Q?YpcdK4uQ7YFe1NoLW1LyzQbBBXdPDXH9QrtHwS8KSNXEuIixTve1MclbKLE+?= =?us-ascii?Q?tpaYZHk57+8zoOV+kg3yDBQcWhjlXnwceXCiD10BmaeDzAVL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lpNE2mUHr0P2mISIkHdhBT/n5DhFuBrn40lry6qxy?= =?us-ascii?Q?R/upPd5m/hOkt+WNLooVF0YLW5mS5UeIAoUqv6P5XkiCnz3VoaE4KuHKTE7X?= =?us-ascii?Q?XcnSh2E0/JqFOHmrN2lz32Y3bdW9H8CLYm44rKultpDiafnOqiG4luIW68OH?= =?us-ascii?Q?r8DpXaL/2fc+XGfwtbD1QE58hUXHoNYjH6Daa8x+2Ph52hQLMOatLLgD1NCE?= =?us-ascii?Q?W/aGPg+SVxArLYdg/tEon5ecqCwQRPM/+c2tm9zvQe1LRH04MlUZdrknZNeh?= =?us-ascii?Q?m0HHJowhpAQch21EWoBxXS3W9KFIoOPggW6q7rOUvHr1Ys7Psj8o2XODg/8X?= =?us-ascii?Q?/qiew=3D=3D?= X-Microsoft-Antispam-Message-Info: XTp2bzZvLWZVzkrMekgY53mTS6Vsvo91793gvw+mMoOBDYK9Yn2j0Ixk8LjgSII6LdEcEQ0NyJMAl1KUdRK/wXF0ZHxVKsY8DWJeIy3FQgTFpx0ifOoWr4elO3K7kMnXGa+V44XfZRttxQOTvZ+md/JlfRfV66m3fx3NbRcg7aMHQmOArARpxyujgnmYOE+j X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3347; 6:GlHYWhz44pAX3xRGoKScY7xDD2qnVcXxB6EVuFeGuZSO03jO68FGxgPpYXKnLupECTgUOlbnKYZ/WSPtdw5W/BVR3AKJqqUiH/+l/h8VicrjYO/o5F0i+/RqqdqxJrQiPPExx1udKb2ADF/k+Cm5boxFTPWVRZshXeHauPH6r3MyEo5LPxD+SUBFfPLdF6CFJcApUVc8ycW1Mf+mHLdPfwCthDuKVGPp2zpMdjehPS7as4JcxpAQYqDhslAUpNpfMCaqP6UkSnXhgtB/zA+hBi7zRTfn5RUlrTh2vSV/SVXks4zzBGAa4kFjLguBc4RZo0JuTZzFot65rkZWYhjSsW9Te3wM5t+daOGvuDxd0u3F/m7p4M05WlfXWZhnCFg5A5oGKVKFiBmWVl+77POnFNP3Y9sdL+njH32PcphIpyga8VECAIYUhYme7fAQJLh0ceTycObBzEbkSBOrEUscUg==; 5:9PBc0gu7/upUO8ABzuGhH9Zf6nwYc2nBe/NVU6NPc8KdUSMJjBrE5QjRTKPQH4e5dyer42TwVAw2CKPrCypyLQe4dKq3M2AQU0a7+MF1aT9L2AjzB0B1FKgXIEFso/oj4D6dWjtjkIYcZBxL3vt4K88Dj53bxJflnN+Klp+uO1A=; 24:oNZCR9Hmx12/a1XfZbudiz6wRMh9O7yMp8GlN51faAc53dQZGhD3uV4LF9MXld7O11VDIv2B6Bl1XDfLcsXiG+PE3Am81rmBe4FJvxRCDvk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3347; 7:+I6TBqBLJeEcz1l96weaCBTwHJ8qGlAwBiAK/w8LrSW9GD/XtSxOY/RiDbQvEJkXpD5BPA3lAV2zmJu7+IDbrExuzKFoLRqJ9NuhdJ22feA3YVGqUKWQi9Jhmdh1RNA70UFCMzbN8Ci7xkZslmxc6vnvoDS5+B5CREjtnncKHQZmRiHabltXzAajYxGZ8OEo55gzXrESyCuI6xahIZaTTYItLAhyzj3ydFY78fQVZXLk22mJ/2geIJCKOJ8hEKzy; 20:DUAoo1TPG/IMdFh6/zdkF28QU80BCkukwvBt2LHcgPlS//XLnPW0oqVFviVvPY2xSU5amHX7oiD0a9JomaPOB/kee2S5lLOQBRlD9/7uNwGuGHUCxWf07ZEaBi3sT3g2FrZ0fx2TgXwQAVl6pcWjpo2b/JRdI6mUkS8uX6PpCTg= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2018 17:44:50.3767 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef886275-eeb9-4fef-ca65-08d5d1555d57 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3347 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.1.138 Subject: [Qemu-devel] [PATCH v3 5/8] scsi: move unmap error checking to the complete callback 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, Anton Nefedov <anton.nefedov@virtuozzo.com>, berto@igalia.com, den@virtuozzo.com, qemu-block@nongnu.org, armbru@redhat.com, mreitz@redhat.com, pbonzini@redhat.com, jsnow@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/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index b08ce8a..0b68a8d 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -1644,9 +1644,6 @@ static void scsi_unmap_complete_noio(UnmapCBData *data, int ret) SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); assert(r->req.aiocb == NULL); - if (scsi_disk_req_check_error(r, ret, false)) { - goto done; - } if (data->count > 0) { r->sector = ldq_be_p(&data->inbuf[0]); @@ -1682,7 +1679,12 @@ static void scsi_unmap_complete(void *opaque, int ret) r->req.aiocb = NULL; aio_context_acquire(blk_get_aio_context(s->qdev.conf.blk)); - scsi_unmap_complete_noio(data, ret); + if (scsi_disk_req_check_error(r, ret, false)) { + scsi_req_unref(&r->req); + g_free(data); + } else { + scsi_unmap_complete_noio(data, ret); + } aio_context_release(blk_get_aio_context(s->qdev.conf.blk)); }