From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v3 09/11] block: Expose queue nr_zones in sysfs Date: Fri, 12 Oct 2018 10:29:04 +0200 Message-ID: <20181012082904.GD30248@lst.de> References: <20181012023012.29923-1-damien.lemoal@wdc.com> <20181012023012.29923-10-damien.lemoal@wdc.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20181012023012.29923-10-damien.lemoal@wdc.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Damien Le Moal Cc: Jens Axboe , "Martin K . Petersen" , Mike Snitzer , linux-block@vger.kernel.org, dm-devel@redhat.com, linux-scsi@vger.kernel.org, Christoph Hellwig , Matias Bjorling List-Id: linux-scsi@vger.kernel.org On Fri, Oct 12, 2018 at 11:30:10AM +0900, Damien Le Moal wrote: > Expose through sysfs the nr_zones field of struct request_queue. > Exposing this value helps in debugging disk issues as well as > facilitating scripts based use of the disk (e.g. blktests). > > For zoned block devices, the nr_zones field indicates the total number > of zones of the device calculated using the known disk capacity and > zone size. This number of zones is always 0 for regular block devices. > > Since nr_zones is defined conditionally with CONFIG_BLK_DEV_ZONED, > introduce the blk_queue_nr_zones() function to return the correct value > for any device, regardless if CONFIG_BLK_DEV_ZONED is set. > > Signed-off-by: Damien Le Moal Looks good, Reviewed-by: Christoph Hellwig