lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY4PR04MB37513D874343FBD2D682DA0DE7550@CY4PR04MB3751.namprd04.prod.outlook.com>
Date:   Thu, 27 Aug 2020 15:04:36 +0000
From:   Damien Le Moal <Damien.LeMoal@....com>
To:     Randy Dunlap <rdunlap@...radead.org>,
        Niklas Cassel <Niklas.Cassel@....com>,
        Jens Axboe <axboe@...nel.dk>
CC:     Johannes Thumshirn <Johannes.Thumshirn@....com>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] null_blk: add support for max open/active zone limit
 for zoned devices

On 2020/08/27 23:51, Randy Dunlap wrote:
> 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?

For the setting part, this is for testing. So any value, even extreme ones (e.g.
1) would be OK to check that a software correctly handles write accesses to
zones for a device that has open/active zone limitations. A more practical way
is to reuse values of real devices. For instance, some SMR disks I use have a
max open limit of 128 and max active 0 (there is no limit for active zones on
SMR disks as ZBC/ZAC specifications do not define this concept).

Another example is our soon to come work on btrfs zone support which shows that
at the very least 6 active zones are needed. So tests can be performed with that
minimum to check the file system and that its block allocator does not go
opening/activating too many zones.

For the using part, the above btrfs example is good: if the FS tries to allocate
blocks in too many inactive zones at the same time without first filling out
zones already active, it may exceed the limit and writes will fail. The FS must
thus be aware of the limits and its block al;locator tuned to limit block
allocations within a set of zones smaller than the maximum active limit.

Does this answer your question ?

> 
> 
>> 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 <niklas.cassel@....com>
>> ---
>> 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.
> 


-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ