[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW4+bn41+LK1y_RmssmwpMML15=WVo6iTL76x8CATzKE3A@mail.gmail.com>
Date: Wed, 18 Oct 2023 10:53:59 -0700
From: Song Liu <song@...nel.org>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
yukuai3@...wei.com, yi.zhang@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH -next 2/6] md: remove flag RemoveSynchronized
On Sun, Oct 15, 2023 at 6:28 PM Yu Kuai <yukuai1@...weicloud.com> wrote:
>
> From: Yu Kuai <yukuai3@...wei.com>
>
> rcu is not used correctly here, because synchronize_rcu() is called
> before replacing old value, for example:
>
> remove_and_add_spares // other path
> synchronize_rcu
> // called before replacing old value
> set_bit(RemoveSynchronized)
> rcu_read_lock()
> rdev = conf->mirros[].rdev
> pers->hot_remove_disk
> conf->mirros[].rdev = NULL;
> if (!test_bit(RemoveSynchronized))
> synchronize_rcu
> /*
> * won't be called, and won't wait
> * for concurrent readers to be done.
> /*
> // access rdev after remove_and_add_spares()
> rcu_read_unlock()
I am having a hard time following the description here. Please be more
specific about what issue we are fixing here.
Thanks,
Song
>
> Hence remove this flag and prepare to remove rcu protection to access
> rdev from 'conf'.
>
> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
> ---
[...]
Powered by blists - more mailing lists