lkml.org 
[lkml]   [2022]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2022-07-28 16:15    [W:0.102 / U:1.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site