linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Fix mdadm vs udev race in Incremental and Assemble
@ 2011-10-21 13:33 Jes.Sorensen
  2011-10-21 13:33 ` [PATCH 1/3] Remove race for starting container devices Jes.Sorensen
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Jes.Sorensen @ 2011-10-21 13:33 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid, lukasz.dorau, adam.kwolek, dledford

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Hi,

When I posted this yesterday I missed a couple of exist cases in the
patch changing the locking scheme for Incremental_container(). Not
sure how I managed that, but fixed in v2 of the patch. The other two
patches remain onchanged.

This patch set fixes the problem with mdadm racing udev during during
incremental or regular assembly of IMSM raids.

There are three patches to the set:
1) Hold the lock while running Incremental_container() to avoid udev
   (or someone else like a boot script) kicking off an additional
   mdadm instance to try and assemble the container in parallel.
2) Don't send udev a 'change' event to handle incremental assembly
   since we are about to do it ourselves anyway.
3) Hold the lock during Assemble() again to avoid udev kicking in
   behind our backs.

With these patches in place, I can no longer reproduce the case I was
seeing on Fedora 16 Beta where an array would not come up correctly.

Patches are on top of Neil's current git repository.

Comments?

Cheers,
Jes


Jes Sorensen (3):
  Remove race for starting container devices.
  Don't tell sysfs to launch the container as we are doing it ourselves
  Hold the map lock while performing Assemble to avoid races with udev

 Incremental.c |   30 ++++++++++++++----------------
 mdadm.c       |    6 ++++++
 2 files changed, 20 insertions(+), 16 deletions(-)

-- 
1.7.4.4


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 0/3] Fix mdadm vs udev race in Incremental and Assemble
@ 2011-10-20 10:06 Jes.Sorensen
  2011-10-20 10:06 ` [PATCH 3/3] Hold the map lock while performing Assemble to avoid races with udev Jes.Sorensen
  0 siblings, 1 reply; 12+ messages in thread
From: Jes.Sorensen @ 2011-10-20 10:06 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid, lukasz.dorau, adam.kwolek, dledford

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Hi,

This patch set fixes the problem with mdadm racing udev during during
incremental or regular assembly of IMSM raids. This set fixes a bug in
the initial patch I posted earlier, and adds the locking to Assemble()
which I didn't have in the first round.

There are three patches to the set:
1) Hold the lock while running Incremental_container() to avoid udev
   (or someone else like a boot script) kicking off an additional
   mdadm instance to try and assemble the container in parallel.
2) Don't send udev a 'change' event to handle incremental assembly
   since we are about to do it ourselves anyway.
3) Hold the lock during Assemble() again to avoid udev kicking in
   behind our backs.

With these patches in place, I can no longer reproduce the case I was
seeing on Fedora 16 Beta where an array would not come up correctly.

Patches are on top of Neil's current git repository.

Comments?

Cheers,
Jes


Jes Sorensen (3):
  Remove race for starting container devices.
  Don't tell sysfs to launch the container as we are doing it ourselves
  Hold the map lock while performing Assemble to avoid races with udev

 Incremental.c |   27 ++++++++++++++-------------
 mdadm.c       |    6 ++++++
 2 files changed, 20 insertions(+), 13 deletions(-)

-- 
1.7.6.4


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

end of thread, other threads:[~2012-01-06 18:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-21 13:33 [PATCH v2 0/3] Fix mdadm vs udev race in Incremental and Assemble Jes.Sorensen
2011-10-21 13:33 ` [PATCH 1/3] Remove race for starting container devices Jes.Sorensen
2011-10-22  0:49   ` NeilBrown
2011-10-22  8:22     ` Jes Sorensen
2011-10-21 13:33 ` [PATCH 2/3] Don't tell sysfs to launch the container as we are doing it ourselves Jes.Sorensen
2011-12-22 23:48   ` NeilBrown
2012-01-03 10:24     ` Jes Sorensen
2012-01-03 15:54       ` Doug Ledford
2012-01-04  2:34         ` NeilBrown
2012-01-06 18:35           ` Doug Ledford
2011-10-21 13:33 ` [PATCH 3/3] Hold the map lock while performing Assemble to avoid races with udev Jes.Sorensen
  -- strict thread matches above, loose matches on Subject: below --
2011-10-20 10:06 [PATCH 0/3] Fix mdadm vs udev race in Incremental and Assemble Jes.Sorensen
2011-10-20 10:06 ` [PATCH 3/3] Hold the map lock while performing Assemble to avoid races with udev Jes.Sorensen

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