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:   Thu, 28 Jul 2022 07:14:28 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Logan Gunthorpe <logang@...tatee.com>
Cc:     linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
        Song Liu <song@...nel.org>,
        Christoph Hellwig <hch@...radead.org>,
        Guoqing Jiang <guoqing.jiang@...ux.dev>,
        Stephen Bates <sbates@...thlin.com>,
        Martin Oliveira <Martin.Oliveira@...eticom.com>,
        David Sloan <David.Sloan@...eticom.com>
Subject: Re: [PATCH 2/5] md/raid5: Make is_inactive_blocked() helper

On Wed, Jul 27, 2022 at 03:05:57PM -0600, Logan Gunthorpe wrote:
> +	int active = atomic_read(&conf->active_stripes);
> +
> +	if (list_empty(conf->inactive_list + hash))
> +		return false;
> +
> +	if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state))
> +		return true;
> +
> +	return active < (conf->max_nr_stripes * 3 / 4);

Wy does this reed ->active_stripes without even knowing if that is
needed?  In fact I don't see the point of the local active variable
at all.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ