All of lore.kernel.org
 help / color / mirror / Atom feed
* fix md disk_name lifetime problems v3
@ 2022-07-18  6:34 Christoph Hellwig
  2022-07-18  6:34 ` [PATCH 01/10] md: fix mddev->kobj lifetime Christoph Hellwig
                   ` (9 more replies)
  0 siblings, 10 replies; 39+ messages in thread
From: Christoph Hellwig @ 2022-07-18  6:34 UTC (permalink / raw)
  To: Song Liu; +Cc: Logan Gunthorpe, linux-raid, linux-block

Hi all,

this series tries to fix a problem repored by Logan where we see
duplicate sysfs file name in md.  It is due to the fact that the
md driver only checks for duplicates on currently live mddevs,
while the sysfs name can live on longer.  It is an old problem,
but the race window got longer due to waiting for the device freeze
earlier in del_gendisk.

Changes since v2:
 - delay mddex->kobj initialization

Changes since v1:
 - rebased to the md-next branch
 - fixed error handling in md_alloc for real
 - add a little cleanup patch

Diffstat:
 md.c |  304 +++++++++++++++++++++++++++++++++++--------------------------------
 md.h |    1 
 2 files changed, 162 insertions(+), 143 deletions(-)

^ permalink raw reply	[flat|nested] 39+ messages in thread
* fix md disk_name lifetime problems v4
@ 2022-07-19  9:18 Christoph Hellwig
  2022-07-19  9:18 ` [PATCH 09/10] md: only delete entries from all_mddevs when the disk is freed Christoph Hellwig
  0 siblings, 1 reply; 39+ messages in thread
From: Christoph Hellwig @ 2022-07-19  9:18 UTC (permalink / raw)
  To: Song Liu; +Cc: Logan Gunthorpe, linux-raid, linux-block

Hi all,

this series tries to fix a problem repored by Logan where we see
duplicate sysfs file name in md.  It is due to the fact that the
md driver only checks for duplicates on currently live mddevs,
while the sysfs name can live on longer.  It is an old problem,
but the race window got longer due to waiting for the device freeze
earlier in del_gendisk.

Changes since v3:
 - remove a now superflous mddev->gendisk NULL check
 - use a bit in mddev->flags instead of a new field

Changes since v2:
 - delay mddev->kobj initialization

Changes since v1:
 - rebased to the md-next branch
 - fixed error handling in md_alloc for real
 - add a little cleanup patch

Diffstat:
 md.c |  310 +++++++++++++++++++++++++++++++++++--------------------------------
 md.h |    2 
 2 files changed, 165 insertions(+), 147 deletions(-)

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

end of thread, other threads:[~2022-07-19  9:25 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18  6:34 fix md disk_name lifetime problems v3 Christoph Hellwig
2022-07-18  6:34 ` [PATCH 01/10] md: fix mddev->kobj lifetime Christoph Hellwig
2022-07-18  6:55   ` Hannes Reinecke
2022-07-18 19:48   ` Logan Gunthorpe
2022-07-18  6:34 ` [PATCH 02/10] md: fix error handling in md_alloc Christoph Hellwig
2022-07-18  7:00   ` Hannes Reinecke
2022-07-18 19:48   ` Logan Gunthorpe
2022-07-18  6:34 ` [PATCH 03/10] md: implement ->free_disk Christoph Hellwig
2022-07-18  7:01   ` Hannes Reinecke
2022-07-18 20:01   ` Logan Gunthorpe
2022-07-18  6:34 ` [PATCH 04/10] md: rename md_free to md_kobj_release Christoph Hellwig
2022-07-18  7:01   ` Hannes Reinecke
2022-07-18 20:02   ` Logan Gunthorpe
2022-07-18  6:34 ` [PATCH 05/10] md: factor out the rdev overlaps check from rdev_size_store Christoph Hellwig
2022-07-18  7:02   ` Hannes Reinecke
2022-07-18 20:02   ` Logan Gunthorpe
2022-07-18  6:34 ` [PATCH 06/10] md: stop using for_each_mddev in md_do_sync Christoph Hellwig
2022-07-18  7:03   ` Hannes Reinecke
2022-07-18 20:02   ` Logan Gunthorpe
2022-07-18  6:34 ` [PATCH 07/10] md: stop using for_each_mddev in md_notify_reboot Christoph Hellwig
2022-07-18  7:05   ` Hannes Reinecke
2022-07-18 20:03   ` Logan Gunthorpe
2022-07-18  6:34 ` [PATCH 08/10] md: stop using for_each_mddev in md_exit Christoph Hellwig
2022-07-18  7:10   ` Hannes Reinecke
2022-07-19  7:03     ` Christoph Hellwig
2022-07-19  7:06       ` Hannes Reinecke
2022-07-18 20:03   ` Logan Gunthorpe
2022-07-18  6:34 ` [PATCH 09/10] md: only delete entries from all_mddevs when the disk is freed Christoph Hellwig
2022-07-18  7:17   ` Hannes Reinecke
2022-07-18 18:20     ` Song Liu
2022-07-19  5:06       ` Christoph Hellwig
2022-07-19  6:28         ` Song Liu
2022-07-19  7:00         ` Hannes Reinecke
2022-07-19  7:14     ` Christoph Hellwig
2022-07-19  7:59       ` Hannes Reinecke
2022-07-18  6:34 ` [PATCH 10/10] md: simplify md_open Christoph Hellwig
2022-07-18  7:19   ` Hannes Reinecke
2022-07-19  9:18 fix md disk_name lifetime problems v4 Christoph Hellwig
2022-07-19  9:18 ` [PATCH 09/10] md: only delete entries from all_mddevs when the disk is freed Christoph Hellwig
2022-07-19  9:25   ` Hannes Reinecke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.