linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fix ->run failure handling
@ 2024-06-04 17:25 Christoph Hellwig
  2024-06-04 17:25 ` [PATCH 1/2] md/raid0: don't free conf on raid0_run failure Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Christoph Hellwig @ 2024-06-04 17:25 UTC (permalink / raw)
  To: Song Liu, Yu Kuai; +Cc: linux-raid

Hi Song, hi Yu,

this series fixes problems I found when testing how md handles
trying to creat an array with disks that support incompatible
protection information or a mix of protection information and
not protection information.

Note that this only fixes the oops due to the double frees.  After the
attempt to at the incompatible device the /dev/md0 node is still around
with zero blocks and linked to the the previous devices in sysfs which
is a bit confusing, but unrelated to the resource cleanup touched
here.

raid10 and raid5 also free conf on failure in their ->run handle,
but set mddev->private to NULL which prevents the double free as well
(but requires more code)

Diffstat:
 raid0.c |   21 +++++----------------
 raid1.c |   14 +++-----------
 2 files changed, 8 insertions(+), 27 deletions(-)

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

end of thread, other threads:[~2024-06-12 16:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-04 17:25 fix ->run failure handling Christoph Hellwig
2024-06-04 17:25 ` [PATCH 1/2] md/raid0: don't free conf on raid0_run failure Christoph Hellwig
2024-06-07  6:08   ` Yu Kuai
2024-06-07  6:17     ` Yu Kuai
2024-06-07  6:19       ` Christoph Hellwig
2024-06-04 17:25 ` [PATCH 2/2] md/raid1: " Christoph Hellwig
2024-06-10 20:58 ` fix ->run failure handling Song Liu
2024-06-11  6:13   ` Christoph Hellwig
2024-06-12 16:36     ` Song Liu

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).