Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp820638ybz; Wed, 29 Apr 2020 09:59:10 -0700 (PDT) X-Google-Smtp-Source: APiQypLF03vy4GBx0JuMPJmIz6Eom2emdV3vQDAHRcd+vTbfpXaOipsaPnWi3SBnr47BwkldGAkc X-Received: by 2002:a17:906:8152:: with SMTP id z18mr3459202ejw.4.1588179550190; Wed, 29 Apr 2020 09:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588179550; cv=none; d=google.com; s=arc-20160816; b=nDDYfDJYR/k/BtmpYeasc7xmIvX3l7hsmutleR0lZwp20eDYrJqMs/Sbh+Pqw/5RAi WbVXuquRKaq7wKnKQAzbfmU7vNs/LY4UvsvbTJC8FoFY8Z6IqqPacIJ+un2K4XZiPW79 FYe/GM+QCsA7AfJvkI1+hk0yhQCnB6gnPLF6+iprtQVnO3jvRWMZJ4yBYCwnrccYxp0f D1h7th6RL6oECK1iV8LOvWCzfGr9ofn6W0uoPiP5wt0VRxXGp+d0OoQFhrUL1fzjvV5u LaTnJR2x4adeaeFSeQjmXB4UNecWI3lmefxanS/fUab387IPYNkQHqFqUqN+Y0wLwjT2 Rbmg== 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=vR6D5Sy6Y+Qdh6ooPREikO8gglly9sa+GW1h2fScSRk=; b=ITyyt3Li9I2/czW66I95YaPjp1GBApMz78fGFwlIMg0L0IYlYCwfPD2+dBXeItXJt2 7jqWbUJ07Z8z7ZE1oN5+jQT7uGNwFdyIUD5JMZTkhtzhwS7MKclUv4/jw00gBfwT2I9h S++RH+Kt36uH6fAESfAFsaDvPUMrb3n6NAtsuQn/gdhgTFcPxkLspeoGgnmJ6sRXhdPx a4RcL7OzaeK1WGOoFwFysgsLYttk2prtFlHbDG74Y075ze/03bAxW3rq+TgCzJ1AWSIO nG6tjrB1RdS5noRQzP5lxei+yvbnijJZ5m7hF+pXUqmVQTgVb8KesKV1HGBxyVJ0brx1 NlAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bm60YqTV; 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 m17si3912841eds.398.2020.04.29.09.58.45; Wed, 29 Apr 2020 09:59:10 -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=bm60YqTV; 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 S1726926AbgD2QyA (ORCPT + 99 others); Wed, 29 Apr 2020 12:54:00 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:44401 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726580AbgD2Qx7 (ORCPT ); Wed, 29 Apr 2020 12:53:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588179237; 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=vR6D5Sy6Y+Qdh6ooPREikO8gglly9sa+GW1h2fScSRk=; b=bm60YqTVU3/ZjtGi4krmouk9iLNfGWj+0+s4Y05ulfPMe1mqjjulo5VSTlQvDApk5TKFAp 7MeyvstW2USdVnrw3d4Pw0emHh3T8mxWfHipkOJtv3FTJFNEHJzq8sqlLXwpqr+fq+460Q kXgLmpLdsdRGZC1gqdxo+bkzn1rasH0= 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-367-ok4IGtwWP-GJITZDUTF0Yg-1; Wed, 29 Apr 2020 12:53:54 -0400 X-MC-Unique: ok4IGtwWP-GJITZDUTF0Yg-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 01DF8800C78; Wed, 29 Apr 2020 16:53:53 +0000 (UTC) Received: from localhost (ovpn-114-2.ams2.redhat.com [10.36.114.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFAB85D785; Wed, 29 Apr 2020 16:53:46 +0000 (UTC) From: Stefan Hajnoczi To: virtualization@lists.linux-foundation.org Cc: Stefano Garzarella , linux-kernel@vger.kernel.org, "Michael S. Tsirkin" , Christoph Hellwig , linux-block@vger.kernel.org, Paolo Bonzini , Jens Axboe , cohuck@redhat.com, Jason Wang , Stefan Hajnoczi , Lance Digby Subject: [PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug Date: Wed, 29 Apr 2020 17:53:45 +0100 Message-Id: <20200429165345.144702-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 QSB1c2Vyc3BhY2UgcHJvY2VzcyBob2xkaW5nIGEgZmlsZSBkZXNjcmlwdG9yIHRvIGEgdmlydGlv X2JsayBkZXZpY2UgY2FuCnN0aWxsIGludm9rZSBibG9ja19kZXZpY2V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