Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2337046ybt; Tue, 16 Jun 2020 03:29:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzI6LQtrB5R9YZxm5iSOqnQ2EavqS22O337RIyB8YYtyCFeSfbQ9JmCa6KAsuy9VzlvAe3a X-Received: by 2002:a05:6402:1d10:: with SMTP id dg16mr1830356edb.309.1592303377925; Tue, 16 Jun 2020 03:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592303377; cv=none; d=google.com; s=arc-20160816; b=bBOT/g+/xXPokv/gw1IspcxTzx6q89QI7uIOB03i4wR89iK9k529gu42k2t+aDYps5 Air3+C3P20N+5JXtnIuM/ELbscx3rTHGrUq4DqAbN0/fFWfi8x/zuPQjkjiw2JqIo+MU fPwE3r5pe9GQwKik7R7B+3fQAx0IuQwlJPjY0RGe0ipOW3cQga5JceO4V+8nNH76blDn 0HwNklEecnq18cfUV7FDiT87LABrQ9erBdWiWyVQATj7MC99HPpKC7U82srRKTUZ5StC zsuD+bTJWZFKUZwRm+BtqTnFwIi/QOJZPEm2iJ9kNtOU5hII5lhjCzr6S3PETc+I7FX8 uXqw== 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:wdcironportexception :ironport-sdr:ironport-sdr:ironport-sdr:dkim-signature; bh=uCpaIFCMIRTKrtfsGcsa3FiCcXPDgdWQZTrckWBMqsk=; b=qkW9FJkVf8hqWFQcciFk9otqZtuPaa6Rk1LTpyZh/5NwqleS8sXJVgM8bb3dRWTazN B5VKnu5rcxonF8lz9V4dobaf5vT2cN7xxFLCCJr+pnAIHH/gDL2ywtPBivML91jiBz9A 9DMfjJu1wMhGmGYGQ4QA8jkVcKBRmi0tWX2mdNwSL4N+TziT940cYUxUTJkKrX/JBgfX NLLqyP9a9UGYh0Vfolsalj9H2/SV9W/70N0XvNRZiIGZeCOy2uiFa45Jf4gcLZq9p9K3 4b3jJBMeCRmSmwC9S0q8S2ukGGNkWriJ7KkSq5ZInsoHPjlv8DegArzt3k0dGnsZDMZQ kGzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=VeuX1aA6; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si11085410ejv.117.2020.06.16.03.29.08; Tue, 16 Jun 2020 03:29:37 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=VeuX1aA6; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728106AbgFPK04 (ORCPT + 99 others); Tue, 16 Jun 2020 06:26:56 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:10852 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbgFPK0E (ORCPT ); Tue, 16 Jun 2020 06:26:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1592303164; x=1623839164; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=k2wrTtH2GzrGLfrzfk/gBGspC7SuqBmLlC4focXFTlU=; b=VeuX1aA6acfxIQLGbEK8xzyv+NRsOQS2d1NOuQ2NBq9tYzknqkCWwIVI E7uoP6jNIlphyQ1UeEZMnV6IxId3S+9M6XhYkZqrtrPlpTs0qmjIAev2L kMfFRmwd9pKAuLUx7djCW8GoVARIBm59ZtPQMIKJDsdbNSBVk168iYxED Qdzb9sUWY85yeSllfbD7EwO5tWDaABASzE0pBcoe4tZKZVVF2dd3kBlLW NcS2pmuQyt12Uy2bO/3NGEYJjcK8mFsAYZKApiszJkfnedxyj66xs2R9Y izFxU4fQBGagxSyXUmWkb9K+c1flOpaozMToY9iTJWeK8gJh/fpMqYz3R Q==; IronPort-SDR: 13BdIXn7vmaUhGM174zGQSQFW6eUnoeeeErBspWBe2gtUtDc1xCBpR+kPUjKjlU6EM75KK9JF0 gSwTFuN20qiRYMGCYsO0znjljW2xjdAu8QY+6wPsWqHdTUk3bXLGMLGyqadfdail9ZXuwtUzXd 9IRb16O/EugXeKaFyTweL6ycuw41GBic0UgFDJKIZoMdJya16eUN1DS+CA8pzPpRy7fZHu2mnf JivKHBCfwfanx6MtcE6bUwzNTac2FLZ6WxGXA62eJM2W1W+vnEhek8As1WCn0/LvnpJ5lxfa0r l+g= X-IronPort-AV: E=Sophos;i="5.73,518,1583164800"; d="scan'208";a="140383059" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 16 Jun 2020 18:26:00 +0800 IronPort-SDR: PxLLMabxEv4N8OiX/TbggrrnRjM5Wni06yrJ7Pp7wcCKrGDT7xnm40Ws0uFobNV2JSUCrqSq6a TSexQfN+SyIbwsWkXN+oPNeG5VIeV0R8w= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2020 03:15:15 -0700 IronPort-SDR: Ds8ZpyQ1PDwkBGREw3CK27qrIdNAtRYofgjQkj3QsRgzQ3Byrn7Pe1AbLOoVBnTiJLKfPrmEOs Y8Sji87WubWw== WDCIronportException: Internal Received: from 31yhj72.ad.shared (HELO localhost.hgst.com) ([10.86.58.100]) by uls-op-cesaip02.wdc.com with ESMTP; 16 Jun 2020 03:25:55 -0700 From: Niklas Cassel To: Jonathan Corbet , Jens Axboe , Keith Busch , Christoph Hellwig , Sagi Grimberg , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Niklas Cassel , 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: [PATCH 0/2] Export max open zones and max active zones to sysfs Date: Tue, 16 Jun 2020 12:25:44 +0200 Message-Id: <20200616102546.491961-1-niklas.cassel@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Export max open zones and max active zones to sysfs. This patch series depends on the Zoned Namespace Command Set series: https://lore.kernel.org/linux-nvme/20200615233424.13458-1-keith.busch@wdc.com/ All zoned block devices in the kernel utilize the "zoned block device support" (CONFIG_BLK_DEV_ZONED). The Zoned Namespace Command Set Specification defines two different resource limits: Max Open Resources and Max Active Resources. The ZAC and ZBC standards define a MAXIMUM NUMBER OF OPEN SEQUENTIAL WRITE REQUIRED ZONES field. Since the ZNS Max Open Resources field has the same purpose as the ZAC/ZBC field, (the ZNS field is 0's based, the ZAC/ZBC field isn't), create a common "max_open_zones" definition in the sysfs documentation, and export both the ZNS field and the ZAC/ZBC field according to this new common definition. The ZNS Max Active Resources field does not have an equivalent field in ZAC/ZBC, however, since both ZAC/ZBC and ZNS utilize the "zoned block device support" in the kernel, create a "max_active_zones" definition in the sysfs documentation, similar to "max_open_zones", and export it according to this new definition. For ZAC/ZBC devices, this field will be exported as 0, meaning "no limit". Niklas Cassel (2): block: add max_open_zones to blk-sysfs block: add max_active_zones to blk-sysfs Documentation/block/queue-sysfs.rst | 14 ++++++++++ block/blk-sysfs.c | 27 +++++++++++++++++++ drivers/nvme/host/zns.c | 2 ++ drivers/scsi/sd_zbc.c | 5 ++++ include/linux/blkdev.h | 40 +++++++++++++++++++++++++++++ 5 files changed, 88 insertions(+) -- 2.26.2