On Thu, Apr 5, 2012 at 8:30 AM, Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@xxxxxxxxx> wrote: > It is for compatibility with OROM way to set "recovery" state. > > Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@xxxxxxxxx> > --- > super-intel.c | 9 +++++++-- > 1 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/super-intel.c b/super-intel.c > index e1cd9b8..f843997 100644 > --- a/super-intel.c > +++ b/super-intel.c > @@ -7211,6 +7211,8 @@ skip_mark_checkpoint: > return consistent; > } > > +static void imsm_delete(struct intel_super *super, struct dl **dlp, unsigned index); > + > static void imsm_set_disk(struct active_array *a, int n, int state) > { > int inst = a->info.container_member; > @@ -7260,6 +7262,11 @@ static void imsm_set_disk(struct active_array *a, int n, int state) > dprintf("while rebuilding"); > end_migration(dev, super, map_state); > map = get_imsm_map(dev, MAP_0); > + /* sweep list of missing disks, OROM might leave > + * some residuals from old members */ > + while (super->missing) { > + imsm_delete(super, &super->missing, super->missing->index); > + } No, the expectation is that the list of disks is only mutated by the monitor from imsm_process_update() where we can be sure that the manager thread is not walking the disk list. I.e. we get away from needing locks by just making sure the monitor can't race with the manager. -- Dan -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html