Message ID | 20231217165359.604246-6-hch@lst.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-2687-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp796143dyi; Sun, 17 Dec 2023 08:57:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlxq95+ZgTlsmI4aYFv21yiZkZFtxVLVpOEFJ77VI7FDxgPZr1DlfQ+4sB8OTI58BEOQEV X-Received: by 2002:a05:622a:cd:b0:423:94f9:f0ce with SMTP id p13-20020a05622a00cd00b0042394f9f0cemr20432355qtw.10.1702832239705; Sun, 17 Dec 2023 08:57:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702832239; cv=none; d=google.com; s=arc-20160816; b=lHeurFqd9by3hRTS8Ck+VVEMYHdW/qKE7y9L/OWhyfg4RsBaPd3YGf+QimPwhHFUvb byPDDzD+AmQs9h0unw1Tsl5wp+F8mzYegfgvzqIyat2SQLa8I4xmHwFGbBhqqr2NsFdT 2hSHW/ru1uTBglHeHh2lFLZdLOhCYD/YauhPqIOyNfuBgtuVG0CA/amtBVe1b9Q6yT+8 xu5lXPuc2dbUFTYlUOM7gbSPqc52QzZhM2vkJDQU3G7uURkqNJDw+MxWAf4zRIV8P2sz WkeWf8sZ1ue4U3mPZZl0yMYAIlQ3E2LRdqtI0bJTdB3gzn2HhW9hwrGIlwtTjTrtK2Q/ 1Lyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ctU7eNWyO5uU8k+K1R2TcQkMR0gAuYk2v8Yjsja/Y1c=; fh=Qt7f1uSggTs9+L2cHwIDejIvdddX1p6luRHcdzQ226s=; b=LE+Hmmf57qNqFvQN0qkEpd1ZzhF4dro27dSA59enQT+BME79w0O6DLg+ZjyotSr9+5 sFQh5IHAYlIY/pW6ZmdTlFoyxOKGg5oiGuQoeo67f2TZFXx622DQ48TjQMSxHMlqSqsK GqFdker7QKxQ9lwhdnjTxoI9G2iyCP1rzv/Qd0ODzMh1aGafoB3Z1wSMjvqNZSNJ16yl nN4yLV/mOXI3a0XSTfhOZ1ihg4nn9VEBOxtkRSDa2YUy22GC7Q77v2xOYmrjLxAh3yfi Yvp4O5qjcNnbyAor7v9PnbjWWANaES9n906mJ6fvSCn4JLolgld2m2Zy/HfBi5fWAl17 b2sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=DXYqZVLT; spf=pass (google.com: domain of linux-kernel+bounces-2687-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2687-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g20-20020a0cf094000000b0067ef2ba6f6esi11734506qvk.492.2023.12.17.08.57.19 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 08:57:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2687-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=DXYqZVLT; spf=pass (google.com: domain of linux-kernel+bounces-2687-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2687-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7D0FD1C2203D for <ouuuleilei@gmail.com>; Sun, 17 Dec 2023 16:57:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91E1249F99; Sun, 17 Dec 2023 16:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="DXYqZVLT" X-Original-To: linux-kernel@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B961648CE8; Sun, 17 Dec 2023 16:54:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=ctU7eNWyO5uU8k+K1R2TcQkMR0gAuYk2v8Yjsja/Y1c=; b=DXYqZVLTY3AXEoBxl64SMyaX8s iocWPDWI6wSF+Py9Nzd53oAjEW8s1qbVJSoFuHgjMO7ReyYzIlvWagT4aJ/QmwFjj50jACktmkLZZ 71o5L28Kq7RX+chawOPRKpL2T53erXPKzIXI2nvXIoChjJLg+xemJqSISQODlbdXJhjhX3utH0SCb szSXCMLib0iNpU+rrWEUHdVpkSQBb6SomuF0Kui47LLE3g4uh80BP5X4zJwwPeRq3X5kFrKbtgrF7 l9Bbdlk6oGly95fNPZZVTL8laT37R0kjKKAPdOWDe6Ywyiy/a+PBeQwlF7aweLD4aibb3mJ7/+CUa zv8VYmog==; Received: from [88.128.92.84] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rEuPB-0088Od-1n; Sun, 17 Dec 2023 16:54:17 +0000 From: Christoph Hellwig <hch@lst.de> To: Jens Axboe <axboe@kernel.dk> Cc: Paolo Bonzini <pbonzini@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Damien Le Moal <dlemoal@kernel.org>, "Martin K. Petersen" <martin.petersen@oracle.com>, dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH 5/5] sd: only call disk_clear_zoned when needed Date: Sun, 17 Dec 2023 17:53:59 +0100 Message-Id: <20231217165359.604246-6-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231217165359.604246-1-hch@lst.de> References: <20231217165359.604246-1-hch@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from <hch@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785549018564519677 X-GMAIL-MSGID: 1785549018564519677 |
Series |
[1/5] virtio_blk: cleanup zoned device probing
|
|
Commit Message
Christoph Hellwig
Dec. 17, 2023, 4:53 p.m. UTC
disk_clear_zoned only needs to be called when a device reported zone
managed mode first and we clear it. Add a check so that disk_clear_zoned
isn't called on devices that were never zoned.
This avoids a fairly expensive queue freezing when revalidating
conventional devices.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/scsi/sd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 2023/12/18 1:53, Christoph Hellwig wrote: > disk_clear_zoned only needs to be called when a device reported zone > managed mode first and we clear it. Add a check so that disk_clear_zoned > isn't called on devices that were never zoned. > > This avoids a fairly expensive queue freezing when revalidating > conventional devices. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Looks good. Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index dbed075cdb981a..8c8ac5cd1833b4 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3149,7 +3149,7 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp) * the device physical block size. */ blk_queue_zone_write_granularity(q, sdkp->physical_block_size); - } else { + } else if (blk_queue_is_zoned(q)) { /* * Anything else. This includes host-aware device that we treat * as conventional.