linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V5 0/3] md: call del_gendisk in sync way
@ 2025-06-10  7:20 Xiao Ni
  2025-06-10  7:20 ` [PATCH 1/3] md: call del_gendisk in control path Xiao Ni
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Xiao Ni @ 2025-06-10  7:20 UTC (permalink / raw)
  To: linux-raid; +Cc: yukuai3, ncroxon, song, yukuai1

Now del_gendisk is called in a queue work which has a small window
that mdadm --stop command exits but the device node still exists.
It causes trouble in regression tests. This patch set tries to resolve
this problem.

v1: replace MD_DELETED with MD_CLOSING
v2: keep MD_CLOSING
v3: call den_gendisk in mddev_unlock, and remove ->to_remove in stop path
and adjust the order of patches
v4: only remove the codes in stop path.
v5: remove sysfs_remove in md_kobj_release and change EBUSY with ENODEV

Xiao Ni (3):
  md: call del_gendisk in control path
  md: Don't clear MD_CLOSING until mddev is freed
  md: remove/add redundancy group only in level change

 drivers/md/md.c | 49 ++++++++++++++++++++++++++-----------------------
 drivers/md/md.h | 26 ++++++++++++++++++++++++--
 2 files changed, 50 insertions(+), 25 deletions(-)

-- 
2.32.0 (Apple Git-132)


^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH V6 0/3] md: call del_gendisk in sync way
@ 2025-06-11  7:31 Xiao Ni
  2025-06-11  7:31 ` [PATCH 3/3] md: remove/add redundancy group only in level change Xiao Ni
  0 siblings, 1 reply; 10+ messages in thread
From: Xiao Ni @ 2025-06-11  7:31 UTC (permalink / raw)
  To: linux-raid; +Cc: yukuai3, ncroxon, song, yukuai1

Now del_gendisk is called in a queue work which has a small window
that mdadm --stop command exits but the device node still exists.
It causes trouble in regression tests. This patch set tries to resolve
this problem.

v1: replace MD_DELETED with MD_CLOSING
v2: keep MD_CLOSING
v3: call den_gendisk in mddev_unlock, and remove ->to_remove in stop path
and adjust the order of patches
v4: only remove the codes in stop path.
v5: remove sysfs_remove in md_kobj_release and change EBUSY with ENODEV
v6: don't initialize ret and add reviewed-by tag

Xiao Ni (3):
  md: call del_gendisk in control path
  md: Don't clear MD_CLOSING until mddev is freed
  md: remove/add redundancy group only in level change

 drivers/md/md.c | 49 ++++++++++++++++++++++++++-----------------------
 drivers/md/md.h | 26 ++++++++++++++++++++++++--
 2 files changed, 50 insertions(+), 25 deletions(-)

-- 
2.32.0 (Apple Git-132)


^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH V4 0/3] md: call del_gendisk in sync way
@ 2025-06-04  9:07 Xiao Ni
  2025-06-04  9:07 ` [PATCH 3/3] md: remove/add redundancy group only in level change Xiao Ni
  0 siblings, 1 reply; 10+ messages in thread
From: Xiao Ni @ 2025-06-04  9:07 UTC (permalink / raw)
  To: linux-raid; +Cc: yukuai3, ncroxon, song, yukuai1

Now del_gendisk is called in a queue work which has a small window
that mdadm --stop command exits but the device node still exists.
It causes trouble in regression tests. This patch set tries to resolve
this problem.

v1: replace MD_DELETED with MD_CLOSING
v2: keep MD_CLOSING
v3: call den_gendisk in mddev_unlock, and remove ->to_remove in stop path
and adjust the order of patches
v4: only remove the codes in stop path.

Xiao Ni (3):
  md: call del_gendisk in control path
  md: Don't clear MD_CLOSING until mddev is freed
  md: remove/add redundancy group only in level change

 drivers/md/md.c | 44 ++++++++++++++++++++++++++------------------
 drivers/md/md.h | 26 ++++++++++++++++++++++++--
 2 files changed, 50 insertions(+), 20 deletions(-)

-- 
2.32.0 (Apple Git-132)


^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH V3 0/2] md: call del_gendisk in sync way
@ 2025-06-03  5:20 Xiao Ni
  2025-06-03  5:20 ` [PATCH 3/3] md: remove/add redundancy group only in level change Xiao Ni
  0 siblings, 1 reply; 10+ messages in thread
From: Xiao Ni @ 2025-06-03  5:20 UTC (permalink / raw)
  To: linux-raid; +Cc: yukuai3, song, ncroxon

Now del_gendisk is called in a queue work which has a small window
that mdadm --stop command exits but the device node still exists.
It causes trouble in regression tests. This patch set tries to resolve
this problem.

By the way, this change will cause a regression problem and which will
be fixed by https://github.com/md-raid-utilities/mdadm/pull/182

v1: replace MD_DELETED with MD_CLOSING
v2: keep MD_CLOSING
v3: call den_gendisk in mddev_unlock, and remove ->to_remove in stop path
and adjust the order of patches

Xiao Ni (3):
  md: call del_gendisk in control path
  md: Don't clear MD_CLOSING until mddev is freed
  md: remove/add redundancy group only in level change

 drivers/md/md.c | 71 +++++++++++++++++++++++++------------------------
 drivers/md/md.h | 26 ++++++++++++++++--
 2 files changed, 60 insertions(+), 37 deletions(-)

-- 
2.32.0 (Apple Git-132)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-06-11  7:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-10  7:20 [PATCH V5 0/3] md: call del_gendisk in sync way Xiao Ni
2025-06-10  7:20 ` [PATCH 1/3] md: call del_gendisk in control path Xiao Ni
2025-06-11  6:09   ` Yu Kuai
2025-06-10  7:20 ` [PATCH 2/3] md: Don't clear MD_CLOSING until mddev is freed Xiao Ni
2025-06-11  6:11   ` Yu Kuai
2025-06-10  7:20 ` [PATCH 3/3] md: remove/add redundancy group only in level change Xiao Ni
2025-06-11  6:17   ` Yu Kuai
  -- strict thread matches above, loose matches on Subject: below --
2025-06-11  7:31 [PATCH V6 0/3] md: call del_gendisk in sync way Xiao Ni
2025-06-11  7:31 ` [PATCH 3/3] md: remove/add redundancy group only in level change Xiao Ni
2025-06-04  9:07 [PATCH V4 0/3] md: call del_gendisk in sync way Xiao Ni
2025-06-04  9:07 ` [PATCH 3/3] md: remove/add redundancy group only in level change Xiao Ni
2025-06-03  5:20 [PATCH V3 0/2] md: call del_gendisk in sync way Xiao Ni
2025-06-03  5:20 ` [PATCH 3/3] md: remove/add redundancy group only in level change Xiao Ni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).