Re: [PATCH 2/5] md/raid5: Make is_inactive_blocked() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux