Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1772537ybz; Thu, 23 Apr 2020 05:41:03 -0700 (PDT) X-Google-Smtp-Source: APiQypKoB+cI+a05SawQzd9Z7nM9eD0hc0gfv7KP8GLJc9TXYuYLi6UsnB1vxlW29MbEQCs9PSWi X-Received: by 2002:a17:906:1e51:: with SMTP id i17mr2433450ejj.336.1587645662980; Thu, 23 Apr 2020 05:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587645662; cv=none; d=google.com; s=arc-20160816; b=fZYoqz6GHh+LnD0PQh2/6g1N04bH9vKQX7iSh5PVI2LoYLBl0AiGatfsj9DAgrpK6j LDvVpxvTpAck7MKlUntxFtyd9B7UTc7bB0ezc4iY9Dnb0oC1jiGJIP1we8I4SVQc9qeN qP7HcQrwW9Bx/b3/ZdZ/X/AchYv5AytpEqYpjAORE2EpjGQ7YYSNNtEDVIlVTYycWGqC C0oSlC3RgiiViO5552TkxJG+Guvb0Y9UasPw5sVTkmHo8O96jcAmtPVcHI3mo5KdoJAW TjwshFCgfVcKNdbTvi26IizDcxOoE/MUG2TVCxCPeBTjh8SxjFSPWKrEkBxMiJEsg9FG a52Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+XlBFNq2TljiIz7UMQVRidAnnXkCvE8Tn9pzuRMdxJE=; b=bSzw4oKbYZfLyB24nBjz0bfPfiDfDtx1+W3aVx1o6kPVCRPX5yBk+D7cFoT0v+9I3u Rxxaykja3gQ3kGlZ5zdEzSq7D9aOWDnbdh8V4kpSJYrcGovbMHrG1ehjPycsZy7Zi7iI qarw7C21bfWk7uHZ7EeqQyXvRbgso6wlvyk3aPKhy2bukRs5ADKZKe/flbLmGvGHWqZQ yj/Oalp8EVDFMcOBDO+dOpdc0IGJMjTPInK3L57/XeCNQTRu1ftkaTiCAMW64quAP3AK /VSdRapTNNp9V1uVX6fHxPGIi21VGBm0uTYCn0MBVMCE1G4jxSVvP9gIpCjNEk2KUt1C bxsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KGETPAGZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o16si989014edi.482.2020.04.23.05.40.39; Thu, 23 Apr 2020 05:41:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KGETPAGZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728328AbgDWMh3 (ORCPT + 99 others); Thu, 23 Apr 2020 08:37:29 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:27770 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726614AbgDWMh3 (ORCPT ); Thu, 23 Apr 2020 08:37:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587645447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=+XlBFNq2TljiIz7UMQVRidAnnXkCvE8Tn9pzuRMdxJE=; b=KGETPAGZxzZWjKfc9ds35wzFNfCghTI9gsRYfEmHKVPhA8jEOfZz7uHGjxusjElANNaswf 3c3QNiFUvHjai6xTFBzDYL1btpbFd5sN+V57r+j+rRo8+udZHW7We48yKnC9xgEWjhnOm4 QiS0ZzdwwcshliVDScCzf1Er38c56+0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-159-RqunHNMFNlqYJD41EtgEXw-1; Thu, 23 Apr 2020 08:37:26 -0400 X-MC-Unique: RqunHNMFNlqYJD41EtgEXw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1F0F61800D51; Thu, 23 Apr 2020 12:37:25 +0000 (UTC) Received: from localhost (ovpn-114-230.ams2.redhat.com [10.36.114.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2FA8B5D70A; Thu, 23 Apr 2020 12:37:18 +0000 (UTC) From: Stefan Hajnoczi To: virtualization@lists.linux-foundation.org Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Jason Wang , "Michael S. Tsirkin" , Stefan Hajnoczi , Lance Digby Subject: [PATCH] virtio-blk: handle block_device_operations callbacks after hot unplug Date: Thu, 23 Apr 2020 13:37:17 +0100 Message-Id: <20200423123717.139141-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QSB2aXJ0aW9fYmxrIGJsb2NrIGRldmljZSBjYW4gc3RpbGwgYmUgcmVmZXJlbmNlZCBhZnRlciBo b3QgdW5wbHVnIGJ5CnVzZXJzcGFjZSBwcm9jZXNzZXMgdGhhdCBob2xkIHRoZSBmaWxlIGRlc2Ny aXB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