Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2022-01-11 Thread Mikko Rantalainen
Guoqing Jiang (2021-02-13 02:49 Europe/Helsinki): > Unregister sync_thread doesn't need to hold reconfig_mutex since it > doesn't reconfigure array. > > And it could cause deadlock problem for raid5 as follows: > > 1. process A tried to reap sync thread with reconfig_mutex held after echo >id

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-14 Thread Donald Buczek
On 14.12.21 11:03, Guoqing Jiang wrote: On 12/14/21 5:31 PM, Donald Buczek wrote:   -void md_reap_sync_thread(struct mddev *mddev) +void md_reap_sync_thread(struct mddev *mddev, bool reconfig_mutex_held)   {   struct md_rdev *rdev;   sector_t old_dev_sectors = mddev->dev_sectors;

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-14 Thread Donald Buczek
On 14.12.21 03:34, Guoqing Jiang wrote: On 12/10/21 10:16 PM, Donald Buczek wrote: Dear Guoqing, On 13.02.21 01:49, Guoqing Jiang wrote: Unregister sync_thread doesn't need to hold reconfig_mutex since it doesn't reconfigure array. And it could cause deadlock problem for raid5 as follows:

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-14 Thread Guoqing Jiang
On 12/14/21 5:31 PM, Donald Buczek wrote:   -void md_reap_sync_thread(struct mddev *mddev) +void md_reap_sync_thread(struct mddev *mddev, bool reconfig_mutex_held)   {   struct md_rdev *rdev;   sector_t old_dev_sectors = mddev->dev_sectors;   bool is_reshaped = false;     /*

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-13 Thread Guoqing Jiang
On 12/10/21 10:16 PM, Donald Buczek wrote: Dear Guoqing, On 13.02.21 01:49, Guoqing Jiang wrote: Unregister sync_thread doesn't need to hold reconfig_mutex since it doesn't reconfigure array. And it could cause deadlock problem for raid5 as follows: 1. process A tried to reap sync thread wi

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-12 Thread Donald Buczek
Dear Guoqing, On 13.02.21 01:49, Guoqing Jiang wrote: Unregister sync_thread doesn't need to hold reconfig_mutex since it doesn't reconfigure array. And it could cause deadlock problem for raid5 as follows: 1. process A tried to reap sync thread with reconfig_mutex held after echo idle to

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-09 Thread Donald Buczek
[Update Guoqing’s email address] On 15.02.21 12:07, Paul Menzel wrote: [+cc Donald] Am 13.02.21 um 01:49 schrieb Guoqing Jiang: Unregister sync_thread doesn't need to hold reconfig_mutex since it doesn't reconfigure array. And it could cause deadlock problem for raid5 as follows: 1. process

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-09 Thread Donald Buczek
On 15.02.21 12:07, Paul Menzel wrote: [+cc Donald] Am 13.02.21 um 01:49 schrieb Guoqing Jiang: Unregister sync_thread doesn't need to hold reconfig_mutex since it doesn't reconfigure array. And it could cause deadlock problem for raid5 as follows: 1. process A tried to reap sync thread with r

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-09 Thread Guoqing Jiang
On 12/9/21 8:57 PM, Donald Buczek wrote: [Update Guoqing’s email address] On 15.02.21 12:07, Paul Menzel wrote: [+cc Donald] Am 13.02.21 um 01:49 schrieb Guoqing Jiang: Unregister sync_thread doesn't need to hold reconfig_mutex since it doesn't reconfigure array. And it could cause deadloc

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-08 Thread Guoqing Jiang
On 12/9/21 12:35 AM, Heinz Mauelshagen wrote: NACK, see details below. On Wed, Dec 8, 2021 at 3:24 PM Guoqing Jiang > wrote: On 12/1/21 1:27 AM, Paul Menzel wrote: > >>> diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c >>> ind

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-08 Thread Heinz Mauelshagen
NACK, see details below. On Wed, Dec 8, 2021 at 3:24 PM Guoqing Jiang wrote: > > > On 12/1/21 1:27 AM, Paul Menzel wrote: > > > >>> diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c > >>> index cab12b2..0c4cbba 100644 > >>> --- a/drivers/md/dm-raid.c > >>> +++ b/drivers/md

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-12-08 Thread Guoqing Jiang
On 12/1/21 1:27 AM, Paul Menzel wrote: diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index cab12b2..0c4cbba 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -3668,7 +3668,7 @@ static int raid_message(struct dm_target *ti, unsigned int argc, char **argv,     if (

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-11-30 Thread Paul Menzel
Dear Linux folks, Am 20.03.21 um 00:00 schrieb Song Liu: On Wed, Feb 24, 2021 at 1:26 AM Guoqing Jiang wrote: On 2/24/21 10:09, Song Liu wrote: On Mon, Feb 15, 2021 at 3:08 AM Paul Menzel wrote: [+cc Donald] Am 13.02.21 um 01:49 schrieb Guoqing Jiang: Unregister sync_thread doesn't need

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-11-30 Thread Paul Menzel
[Update Guoqing’s email address] Am 30.11.21 um 18:25 schrieb Paul Menzel: Dear Linux folks, Am 20.03.21 um 00:00 schrieb Song Liu: On Wed, Feb 24, 2021 at 1:26 AM Guoqing Jiang wrote: On 2/24/21 10:09, Song Liu wrote: On Mon, Feb 15, 2021 at 3:08 AM Paul Menzel wrote: [+cc Donald] Am

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-03-22 Thread Song Liu
On Wed, Feb 24, 2021 at 1:26 AM Guoqing Jiang wrote: > > > > On 2/24/21 10:09, Song Liu wrote: > > On Mon, Feb 15, 2021 at 3:08 AM Paul Menzel wrote: > >> > >> [+cc Donald] > >> > >> Am 13.02.21 um 01:49 schrieb Guoqing Jiang: > >>> Unregister sync_thread doesn't need to hold reconfig_mutex since

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-02-25 Thread Song Liu
On Mon, Feb 15, 2021 at 3:08 AM Paul Menzel wrote: > > [+cc Donald] > > Am 13.02.21 um 01:49 schrieb Guoqing Jiang: > > Unregister sync_thread doesn't need to hold reconfig_mutex since it > > doesn't reconfigure array. > > > > And it could cause deadlock problem for raid5 as follows: > > > > 1. pr

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-02-25 Thread Guoqing Jiang
On 2/24/21 10:09, Song Liu wrote: On Mon, Feb 15, 2021 at 3:08 AM Paul Menzel wrote: [+cc Donald] Am 13.02.21 um 01:49 schrieb Guoqing Jiang: Unregister sync_thread doesn't need to hold reconfig_mutex since it doesn't reconfigure array. And it could cause deadlock problem for raid5 as fo

[dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-02-17 Thread Guoqing Jiang
Unregister sync_thread doesn't need to hold reconfig_mutex since it doesn't reconfigure array. And it could cause deadlock problem for raid5 as follows: 1. process A tried to reap sync thread with reconfig_mutex held after echo idle to sync_action. 2. raid5 sync thread was blocked if there wer

Re: [dm-devel] [PATCH V2] md: don't unregister sync_thread with reconfig_mutex held

2021-02-17 Thread Paul Menzel
[+cc Donald] Am 13.02.21 um 01:49 schrieb Guoqing Jiang: Unregister sync_thread doesn't need to hold reconfig_mutex since it doesn't reconfigure array. And it could cause deadlock problem for raid5 as follows: 1. process A tried to reap sync thread with reconfig_mutex held after echo idle