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]
Date:   Tue, 3 May 2022 10:01:45 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Pankaj Raghav <p.raghav@...sung.com>, jaegeuk@...nel.org,
        axboe@...nel.dk, snitzer@...nel.org, hch@....de, mcgrof@...nel.org,
        naohiro.aota@....com, sagi@...mberg.me,
        damien.lemoal@...nsource.wdc.com, dsterba@...e.com,
        johannes.thumshirn@....com
Cc:     linux-kernel@...r.kernel.org, linux-btrfs@...r.kernel.org,
        clm@...com, gost.dev@...sung.com, chao@...nel.org,
        linux-f2fs-devel@...ts.sourceforge.net, josef@...icpanda.com,
        jonathan.derrick@...ux.dev, agk@...hat.com, kbusch@...nel.org,
        kch@...dia.com, linux-nvme@...ts.infradead.org,
        dm-devel@...hat.com, jiangbo.365@...edance.com,
        linux-fsdevel@...r.kernel.org, matias.bjorling@....com,
        linux-block@...r.kernel.org
Subject: Re: [PATCH 13/16] null_blk: allow non power of 2 zoned devices

On 4/27/22 09:02, Pankaj Raghav wrote:
> diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
> index c441a4972064..82a62b543782 100644
> --- a/drivers/block/null_blk/main.c
> +++ b/drivers/block/null_blk/main.c
> @@ -1931,8 +1931,8 @@ static int null_validate_conf(struct nullb_device *dev)
>   		dev->mbps = 0;
>   
>   	if (dev->zoned &&
> -	    (!dev->zone_size || !is_power_of_2(dev->zone_size))) {
> -		pr_err("zone_size must be power-of-two\n");
> +	    (!dev->zone_size)) {
> +		pr_err("zone_size must not be zero\n");
>   		return -EINVAL;
>   	}

Please combine "if (dev->zoned &&" and "(!dev->zone_size)) {" into a 
single line and leave out the parentheses that became superfluous.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ