Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp579102ybe; Fri, 6 Sep 2019 04:11:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRcCfIFdkWG/9poRJq54uFep0ItsJX/WDLYJNM5WYElS32l0uj1L7KZGMzIB7U+AjzDnEg X-Received: by 2002:a63:5550:: with SMTP id f16mr7777994pgm.426.1567768299722; Fri, 06 Sep 2019 04:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567768299; cv=none; d=google.com; s=arc-20160816; b=09BH+XyMDpktdGIFKKDbDdyshtW2RJL+Fyig6VYmGmeem2sOzjsrWqMKZqNq8Z8F5/ jebZo+tXuDAVFo2V5OwZ/Dy4IU+NA1mzSSAI5cekKgWX0CbAHkHaCIO/Jd8iMd5xoZVP 4MfRQ65C44M2Z3XTffR/ypRf7Tqr+Bz3Xd+eaoitv59kt01sB0+mdA+kr0RjInaqbaEP qpU8f6rAFlKWqDvm/JhEz/gM3AF9dBGHIH/EEbsaVjWNg5TGkss/0bXDwTwszDCwhupx da4JWQuRekAimE3+M6sghCIryq9jRzQCFRMrFZuYGQpowhY0EKxxcmLKAfpWfAfrBXTu M3Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JiRtLJOhYxjOGFQnLM92WQV96yLyMijTLUIIgyysqLg=; b=j6rZfa4eDkJZGpfYca6Lp/dXhKQYt+5pMtPeCNy6VBiKmZCP9S/PyiUqVtCpsBuhd2 g1EfEFlzXvXq9SQnZgsfsLakmWOvaOKXl1F6kwhUNitdTRDmNBRPntxPJ9aNLLjDpJLF m7a9jC0IyL/35/MlyzPpm2rI8j3A3LQxkommnU8xENSTQcMhTal1PtPXSQgubwNm/VDh RM4XrtTNOSAaSklh+ycwWxj5aGL6Dsw6NCV+dRsOnFkghZbw1CLPQC9uN/N7/a5uVI8o FS5d6guXM3htRy4E4+amCFmT/oo0XhhlCowjnb9bpU/o3xj6BQtDyyrESIyosCGnUYzF ULrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g23si5017767pfo.259.2019.09.06.04.11.24; Fri, 06 Sep 2019 04:11:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392781AbfIFIyO (ORCPT + 99 others); Fri, 6 Sep 2019 04:54:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60288 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726936AbfIFIyN (ORCPT ); Fri, 6 Sep 2019 04:54:13 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6BCED308FBAC; Fri, 6 Sep 2019 08:54:13 +0000 (UTC) Received: from localhost (ovpn-117-208.ams2.redhat.com [10.36.117.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id 862C2600CC; Fri, 6 Sep 2019 08:54:10 +0000 (UTC) Date: Fri, 6 Sep 2019 09:54:09 +0100 From: Stefan Hajnoczi To: Matt Lupfer Cc: "mst@redhat.com" , "jasowang@redhat.com" , "pbonzini@redhat.com" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "virtualization@lists.linux-foundation.org" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2] scsi: virtio_scsi: unplug LUNs when events missed Message-ID: <20190906085409.GC5900@stefanha-x1.localdomain> References: <20190905181903.29756-1-mlupfer@ddn.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WplhKdTI2c8ulnbP" Content-Disposition: inline In-Reply-To: <20190905181903.29756-1-mlupfer@ddn.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 06 Sep 2019 08:54:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --WplhKdTI2c8ulnbP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2019 at 06:19:28PM +0000, Matt Lupfer wrote: > The event handler calls scsi_scan_host() when events are missed, which > will hotplug new LUNs. However, this function won't remove any > unplugged LUNs. The result is that hotunplug doesn't work properly when > the number of unplugged LUNs exceeds the event queue size (currently 8). >=20 > Scan existing LUNs when events are missed to check if they are still > present. If not, remove them. >=20 > Signed-off-by: Matt Lupfer > --- > drivers/scsi/virtio_scsi.c | 33 +++++++++++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) Please include a changelog in future patch revisions. For example: Signed-off-by: ... --- v2: * Replaced magic constants with sd.h constants [Michael] Just C and virtio code review, no SCSI specifics: Reviewed-by: Stefan Hajnoczi --WplhKdTI2c8ulnbP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl1yHrEACgkQnKSrs4Gr c8gzzAgAuYSjHn9hrs1cMsy6ox6Yq6EuWDPA1QLCT8w5U0wDuEYZNyEcXwfjz9YX UTUP5SvIxTPY0h1xkG+xZBWzxeGSzO8+24810N6QeJJLbmXqLJT1YATxntwvp+wa Y0pP8RmHry+TLkuq7kH87eFrp5+kml6Cxq3mTAx8ELSpikGl8GGK6SQN958+5Tgv NfI9iko4E3c8hSbRthCUMt6ZQpJEpMIoh2DsIkFeY5OI+ZXs4uCUMqc8u9oVCDwf sj3CrN+r27WQ5oGlXrg3MA4w9Ng6+hvpPRbhbLli4v7NeFUyswz2qJDQWM2e87Pt vJ2fssWWXnh3m7u5LraZwstLo3ainA== =6rpq -----END PGP SIGNATURE----- --WplhKdTI2c8ulnbP--