Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp493889pxa; Thu, 27 Aug 2020 07:53:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAp6CgvJC5dox2GWXNrrgLY/7hmbbsUjuu/1esMt3C7FASaMNKrmxIyATuBVQksEyoYbmT X-Received: by 2002:a50:fb15:: with SMTP id d21mr20321951edq.312.1598540021756; Thu, 27 Aug 2020 07:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598540021; cv=none; d=google.com; s=arc-20160816; b=X+WYsSeJChSN+kNpj9Kyk/DpQA26IfMSdVxR1rSGxbdf5S0b2o4H3su0SqJ0XjgoGW JRUsjXH43sirNjQh4MXu0PzkvBdIkiu4bChbLhPC6y8AcXGpK9Ht3ZJdACB0/x0XQn2D VM0kHYpDbp/YITcd81z7jiF0BG/aE/k5bRsTv8vIeynvwkadm5UGns8ROp/phfiNPRj0 p2L/kzw7Mou9U+f+gKEINlK0Xx8Qo6f0EWd2fniKQQBeypWA/8HxPxce4xQw2mhvlTet ZDZHXk/gY5t3SA69bDbY0w5s09559Ru8BfDItBO7Tn0Y1EasnvXEQoqIH0XMv+8ErXAB 1e1A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=CXo1VsNJMnumrlPogWjBzw/zPcnBvymTjxJVEjV9DV8=; b=KBogfHu2aU3gbHZ6s2n+OB/QIzf+klK0Z9hPCsp+OWVZc3SjAIDZMGtgDzVSUwL1ij 4NGbFzbXteuF1sXYgsJKqYooM7KoWhiSO43jB9x620u4ADhLhcNKrdN6OTsWsGO/9EKM saCrJXJYkMJ0c8qXJEITGM1eeJ6WkeQ0fim0ekW92uQAGcz0q500Tm5cf/p9/Vd67QdA v99VMfouLv8FbToM0pv4IECIxb8BCg75UriMMdPDiPi+ortrrC8MDUwXdG8OcgGMfoWX Bj1vqIW1gZO3ZOGiRP+/QviwY6QitmvbGCZm/QUsT7Tk/3ZVOmyiek2JUQgnh2qraLbK +LUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=zJeJtPAj; 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 j25si1703740edf.435.2020.08.27.07.53.19; Thu, 27 Aug 2020 07:53:41 -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=@infradead.org header.s=merlin.20170209 header.b=zJeJtPAj; 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 S1728356AbgH0Ovt (ORCPT + 99 others); Thu, 27 Aug 2020 10:51:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727906AbgH0Ovq (ORCPT ); Thu, 27 Aug 2020 10:51:46 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F02ACC061264; Thu, 27 Aug 2020 07:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=CXo1VsNJMnumrlPogWjBzw/zPcnBvymTjxJVEjV9DV8=; b=zJeJtPAjIfwokijM3k3lS2EFrm p9b5Je7DxKqNlk4czOD+QNZUCgF5kKnpUWj0iQiV8X9efsyedLsuRlOLEEIxaRVC3qtB1UZU8eTIo f5FTAHewB3b+83F7e2HolU51i5Hxr25cV7RlGmTPHLJQwLbjOxid5eDC51q5OOmzIrUFiChw+gBl3 riyvif8xmDNzt3vRE2YCjf8JJJ51SPyNvpVmOx0TZIVr7JemYwDbUiDS8fCgJfWKa97RtmQtzhius 3YQ2HkBL3/4rWTd6I55RDITc7Y2/JJdWKJ4B+7sYH7q56rXJGcqQb7ZHnP1P9Df9IO54dLGAYRJOR v3JnR6og==; Received: from [2601:1c0:6280:3f0::19c2] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBJFf-0007Dp-1X; Thu, 27 Aug 2020 14:51:43 +0000 Subject: Re: [PATCH v2] null_blk: add support for max open/active zone limit for zoned devices To: Niklas Cassel , Jens Axboe Cc: damien.lemoal@wdc.com, johannes.thumshirn@wdc.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200827135018.63644-1-niklas.cassel@wdc.com> From: Randy Dunlap Message-ID: <6d9fb163-f9d9-1f2d-d88c-db9d3a6185b4@infradead.org> Date: Thu, 27 Aug 2020 07:51:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200827135018.63644-1-niklas.cassel@wdc.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/27/20 6:50 AM, Niklas Cassel wrote: > Add support for user space to set a max open zone and a max active zone > limit via configfs. By default, the default values are 0 == no limit. Hi, How does a user find out about how to use/set these limits? > Call the block layer API functions used for exposing the configured > limits to sysfs. > > Add accounting in null_blk_zoned so that these new limits are respected. > Performing an operating that would exceed these limits results in a > standard I/O error. > > A max open zone limit exists in the ZBC standard. > While null_blk_zoned is used to test the Zoned Block Device model in > Linux, when it comes to differences between ZBC and ZNS, null_blk_zoned > mostly follows ZBC. > > Therefore, implement the manage open zone resources function from ZBC, > but additionally add support for max active zones. > This enables user space not only to test against a device with an open > zone limit, but also to test against a device with an active zone limit. > > Signed-off-by: Niklas Cassel > --- > Changes since v1: > -Fixed review comments by Damien Le Moal. > > drivers/block/null_blk.h | 5 + > drivers/block/null_blk_main.c | 16 +- > drivers/block/null_blk_zoned.c | 319 +++++++++++++++++++++++++++------ > 3 files changed, 282 insertions(+), 58 deletions(-) thanks. -- ~Randy