[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160730210216.GC9149@kernel.org>
Date: Sat, 30 Jul 2016 14:02:16 -0700
From: Shaohua Li <shli@...nel.org>
To: ZhengYuan Liu <liuzhengyuan@...inos.cn>
Cc: neilb@...e.com, liuzhengyuang521@...il.com,
linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] raid5: fix incorrectly counter of
conf->empty_inactive_list_nr
On Thu, Jul 28, 2016 at 02:22:14PM +0800, ZhengYuan Liu wrote:
> The counter conf->empty_inactive_list_nr is only used for determine if the
> raid5 is congested which is deal with in function raid5_congested().
> It was increased in get_free_stripe() when conf->inactive_list got to be
> empty and decreased in release_inactive_stripe_list() when splice
> temp_inactive_list to conf->inactive_list. However, this may have a
> problem when raid5_get_active_stripe or stripe_add_to_batch_list was called,
> because these two functions may call list_del_init(&sh->lru) to delete sh from
> "conf->inactive_list + hash" which may cause "conf->inactive_list + hash" to
> be empty when atomic_inc_not_zero(&sh->count) got false. So a check should be
> done at these two point and increase empty_inactive_list_nr accordingly.
> Otherwise the counter may get to be negative number which would influence
> async readahead from VFS.
>
> Signed-off-by: ZhengYuan Liu <liuzhengyuan@...inos.cn>
Applied, thanks!
Powered by blists - more mailing lists