Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1141258pxj; Fri, 21 May 2021 07:24:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUOflHs+98ijrxX6WtdkMWOUbJDCE35UEvhAKAULBvGY3G3jclV270SuEqoLtJozI793kL X-Received: by 2002:a05:6402:1d2c:: with SMTP id dh12mr8137453edb.237.1621607071661; Fri, 21 May 2021 07:24:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621607071; cv=none; d=google.com; s=arc-20160816; b=T/M2yeZ2FNQa0uQuhfFYgQnbnqCajArLkvly8DPrHc3fg6EVmr16M0iqFYcd3AOtI4 1CTxuFmY96rDV6tQ0T5TYl3rubXM67ZBCiELxUTvLXv5a4H00tZXpayxyZO6HTTfDFv0 5+oyAFK/bFcwFAcfF36kmqCtw1DvAaQkjh5kUf+PVAGjpFpaK2+yH31I2UrT99gBlc78 aFFn6SQlLY65IwgDNikufomVSgsOA8OV5PSKGacx8y4TT/ch3gS7POem46Q8XC690JAT ZLKIJyaDzsHIG9bDwPmXuBElfR/UtbmmPcpd4nZwC6ZMvfiQePkflfH5qQ+lqS29vuR6 +jdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4aBvqPz1XdTYzGjtiidMRJ9JyKKUPGFlSqJpEy6NtC0=; b=X6p+cXS88Y0uKEC04Vv96fRaZ3OsQ7T8JfCs35sssb5wT8Ul0oX5xU1QKtk17+1PrB jmImQtoZOf7ibjvktJT2cmmaHbWZLKWvE6o9tX5n4UdcMmaeuVX1ZWZbqQ2WuGopWVoo 0LVazq6qYWWxnoFrCvK/YPEOTzYPcHGBEY2W83i8HL9Xx4eGylTnFHaXpnPR465s+Z65 wyHSmrMMn0nofTVfhZ4rmLBPl2o1TvoiK5EBWbgdqM8nStxO/+A5QZhmxK8qhxeOK+CB oE+eGsJ8Uj6oTyI5feNfEGaSHHYk7dHsEkRCiffWWBZ1yTX/749QX2/0eVplDP2hq2lW 3PWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aitiHYes; 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 cw3si5574909ejb.264.2021.05.21.07.24.06; Fri, 21 May 2021 07:24:31 -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=aitiHYes; 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 S242258AbhETOQO (ORCPT + 99 others); Thu, 20 May 2021 10:16:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44855 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243656AbhETOPK (ORCPT ); Thu, 20 May 2021 10:15:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621520028; 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: in-reply-to:in-reply-to:references:references; bh=4aBvqPz1XdTYzGjtiidMRJ9JyKKUPGFlSqJpEy6NtC0=; b=aitiHYesXwo0gQCQn/fAF2K5VzZOT9+TxSS0kazYpMhGu/IuYr/Xykmvpqno3DuXuM+ea0 HOpppP2pb12ys6uifhTRUgtlJM2a5qp3Ay9FZYud3L3DkcItyjeEzy3OMl4ZzHTu1ErmnB N0ThXBr+dCz1y4MRFRfU6bkAfg0wlzw= 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-394-bnN5ytCLMaSf6Ku-fnacKg-1; Thu, 20 May 2021 10:13:45 -0400 X-MC-Unique: bnN5ytCLMaSf6Ku-fnacKg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E432D107ACE3; Thu, 20 May 2021 14:13:43 +0000 (UTC) Received: from localhost (ovpn-115-223.ams2.redhat.com [10.36.115.223]) by smtp.corp.redhat.com (Postfix) with ESMTP id 770231037F22; Thu, 20 May 2021 14:13:43 +0000 (UTC) From: Stefan Hajnoczi To: virtualization@lists.linux-foundation.org Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Jason Wang , Paolo Bonzini , Jens Axboe , slp@redhat.com, sgarzare@redhat.com, "Michael S. Tsirkin" , Stefan Hajnoczi Subject: [PATCH 3/3] virtio_blk: implement blk_mq_ops->poll() Date: Thu, 20 May 2021 15:13:05 +0100 Message-Id: <20210520141305.355961-4-stefanha@redhat.com> In-Reply-To: <20210520141305.355961-1-stefanha@redhat.com> References: <20210520141305.355961-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org UmVxdWVzdCBjb21wbGV0aW9uIGxhdGVuY3kgY2FuIGJlIHJlZHVjZWQgYnkgdXNpbmcgcG9sbGlu ZyBpbnN0ZWFkIG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