Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2357495ybt; Fri, 3 Jul 2020 07:16:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFynAJjWhBhtcAiL4Woobc1S+gFF3AiUPGSrOk/ps5JcSL1jVUcAq1LO9v2Xtr6eHQTxpY X-Received: by 2002:a17:906:1a54:: with SMTP id j20mr31950482ejf.455.1593785781228; Fri, 03 Jul 2020 07:16:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593785781; cv=none; d=google.com; s=arc-20160816; b=ogFQ0R4ht/Nm9bItTUur3WIUqjDHmkmaD58qd8dd/Z+APND3dsIz9gSrUXmqo/lbvI RNqdR7HHbBZ3rBQgi+XRgA5YS4xjpXkS+jwcyL6OuWFuizWIm/5thrVXYPy0mMlK71eY VPLH7Ytzv+cQCZf7DyJf9bcX3jVQjdH5wkZVMG7EYWlXDiMKRVE4irv8MJpRe+KZMW9t VjDBBmhOl05AaNcuXIAVOSE04xJHvxyL0cjAgo7LgfJgYIULaWzbOC4hhPB84QXRTs42 Vzwa+a9wrRHmZmB0A4a9GeIGAkksjxrg09Za0KqrZTR4u9oofM85MD1c3pj+AN6mS8Q4 15dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=zKWBYny3iDOXqfEov6mNFlQwdTq6pPlOUJ3jHU1Ut0o=; b=tgTj41PB0vwoXf8s/q+U1jphp3Q2s8+HLTpvjxCgt3X4+Q8esrLvexM/+iYTuMQM3p zCgriTzXG9AvZie/geGoszN2Kkfmxeh74RAbEKs5rDMcRyJ/l8roPPAjmR7ERZWYK51I Q22FXcN0gByP+XHYY6HbQZy2t1+xwj0CIug4lAL2W+H+t88l8J12V3N5ioZhXD3HYNtG wODmY3eIQihX2eKU2SGTYhMjVic180ybJII0WTnOVoudqiBMaK2uUa+zLoBRisKSoUNv +J4HvzjtxnsFAE/31TVsnKXuGTnPMl8DZA2v7e8b19ajQRrLb+4RuvoCBoiGms16UN3A NRAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=X4zSbtnO; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=BcZNo9Jl; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si10491723edi.7.2020.07.03.07.15.58; Fri, 03 Jul 2020 07:16:21 -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=@kroah.com header.s=fm1 header.b=X4zSbtnO; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=BcZNo9Jl; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbgGCOPh (ORCPT + 99 others); Fri, 3 Jul 2020 10:15:37 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:37865 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbgGCOPh (ORCPT ); Fri, 3 Jul 2020 10:15:37 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 0955B5803F1; Fri, 3 Jul 2020 10:15:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 03 Jul 2020 10:15:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm1; bh=z KWBYny3iDOXqfEov6mNFlQwdTq6pPlOUJ3jHU1Ut0o=; b=X4zSbtnOChdOfdwj4 ZsHpWEPgI/P4NvAlL45g+qH4wxO/o8Ld1NZmdnj9cFAfq+J8hKUxCToDyxmPztt9 AASsj2Po/V6y+BqZZkCiD74IdhlVHm37lKLznTwxVgBcVwHJthAX0ASQtI0Ch960 9J3N+Xe/DibLRGpYHuYHYR0GR3ehGVK03cCyKhkqk9O1pLKYb1my36LVwUIm4uvx Wu4qkRgAmOFjzhsTCZWl7pourJ+0PQW3KTuM5S8XaMdHH5Na8BSmkbjpOmQfKa93 iGXF2NK1QHLaOE77wjcqea0JWr0q+OVCuA6MYZr3+g8LCFEh+9uMFSgwZLeSyHoJ ciP6w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=zKWBYny3iDOXqfEov6mNFlQwdTq6pPlOUJ3jHU1Ut 0o=; b=BcZNo9JlcfpZeWiB7hF613yGVEH8R2lVktXE743yxza6iUxP0gRC1PRIA ITPN6kR+aLTJcAJSPK26W5DkkOxvxO/fuzqOo7zh6E3yyDZeiKljrNap83yiIX56 Dl1+3Wx2L6bLFg0k4iJGGQQKyqu9W9YBp7o2DgOGWQn/DhfclsTLHBPopS/r3eAl IvFZbfjj8nUUxdHhmyxWHFuMTfutcL4crBC6FJKQK5d/oIpBoHyXruwVWCxlW6ac KVoA3mQ9yeb6o+EeNsaqmEO5vCg7yeq/ho4TaFnwVQPX2nMlv8C1AYvgo1vJ8b3c aGF5nQmg4pBcRsvhmi4WcrJhz/lMQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrtdeigdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggugfgjsehtkeertddttddunecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevtdeile euteeggefgueefhfevgfdttefgtefgtddvgeejheeiuddvtdekffehffenucfkphepkeef rdekiedrkeelrddutdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id B62FD3060061; Fri, 3 Jul 2020 10:15:33 -0400 (EDT) Date: Fri, 3 Jul 2020 16:15:38 +0200 From: Greg KH To: Niklas Cassel Cc: Jonathan Corbet , Jens Axboe , Keith Busch , Christoph Hellwig , Sagi Grimberg , "James E.J. Bottomley" , "Martin K. Petersen" , Javier =?iso-8859-1?Q?Gonz=E1lez?= , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org Subject: Re: [PATCH v2 2/2] block: add max_active_zones to blk-sysfs Message-ID: <20200703141538.GB2953162@kroah.com> References: <20200702181922.24190-1-niklas.cassel@wdc.com> <20200702181922.24190-3-niklas.cassel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200702181922.24190-3-niklas.cassel@wdc.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 02, 2020 at 08:19:22PM +0200, Niklas Cassel wrote: > Add a new max_active zones definition in the sysfs documentation. > This definition will be common for all devices utilizing the zoned block > device support in the kernel. > > Export max_active_zones according to this new definition for NVMe Zoned > Namespace devices, ZAC ATA devices (which are treated as SCSI devices by > the kernel), and ZBC SCSI devices. > > Add the new max_active_zones member to struct request_queue, rather > than as a queue limit, since this property cannot be split across stacking > drivers. > > For SCSI devices, even though max active zones is not part of the ZBC/ZAC > spec, export max_active_zones as 0, signifying "no limit". > > Signed-off-by: Niklas Cassel > Reviewed-by: Javier Gonz?lez > --- > Documentation/block/queue-sysfs.rst | 7 +++++++ > block/blk-sysfs.c | 14 +++++++++++++- > drivers/nvme/host/zns.c | 1 + > drivers/scsi/sd_zbc.c | 1 + > include/linux/blkdev.h | 16 ++++++++++++++++ > 5 files changed, 38 insertions(+), 1 deletion(-) > > diff --git a/Documentation/block/queue-sysfs.rst b/Documentation/block/queue-sysfs.rst > index f01cf8530ae4..f261a5c84170 100644 > --- a/Documentation/block/queue-sysfs.rst > +++ b/Documentation/block/queue-sysfs.rst > @@ -117,6 +117,13 @@ Maximum number of elements in a DMA scatter/gather list with integrity > data that will be submitted by the block layer core to the associated > block driver. > > +max_active_zones (RO) > +--------------------- > +For zoned block devices (zoned attribute indicating "host-managed" or > +"host-aware"), the sum of zones belonging to any of the zone states: > +EXPLICIT OPEN, IMPLICIT OPEN or CLOSED, is limited by this value. > +If this value is 0, there is no limit. Shouldn't this all be in Documentation/ABI/ to describe the sysfs files? All other kernel subsystems use that format, why is block special? > + > max_open_zones (RO) > ------------------- > For zoned block devices (zoned attribute indicating "host-managed" or > diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c > index fa42961e9678..624bb4d85fc7 100644 > --- a/block/blk-sysfs.c > +++ b/block/blk-sysfs.c > @@ -310,6 +310,11 @@ static ssize_t queue_max_open_zones_show(struct request_queue *q, char *page) > return queue_var_show(queue_max_open_zones(q), page); > } > > +static ssize_t queue_max_active_zones_show(struct request_queue *q, char *page) > +{ > + return queue_var_show(queue_max_active_zones(q), page); > +} > + > static ssize_t queue_nomerges_show(struct request_queue *q, char *page) > { > return queue_var_show((blk_queue_nomerges(q) << 1) | > @@ -677,6 +682,11 @@ static struct queue_sysfs_entry queue_max_open_zones_entry = { > .show = queue_max_open_zones_show, > }; > > +static struct queue_sysfs_entry queue_max_active_zones_entry = { > + .attr = {.name = "max_active_zones", .mode = 0444 }, > + .show = queue_max_active_zones_show, > +}; __ATTR_RO()? thanks, greg k-h