On Mon, 10 Jan 2011 12:27:50 +0100 Adam Kwolek <adam.kwolek@xxxxxxxxx> wrote: > Updates has to be posted when monitor is active for this array/container. > Only when monitor is not active mdadm has update metadata itself. > > Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> > --- > > super-intel.c | 10 ++++++++-- > 1 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/super-intel.c b/super-intel.c > index 58a776e..8644c39 100644 > --- a/super-intel.c > +++ b/super-intel.c > @@ -6570,9 +6570,15 @@ static int imsm_reshape_super(struct supertype *st, long long size, int level, > goto exit_imsm_reshape_super; > } > > - /* As well as creating update, we apply update. > - */ > + if (mdmon_running(st->container_dev)) { > + ret_val = 0; > + append_metadata_update(st, u, len); > + goto exit_imsm_reshape_super; > + } > + > > + /* no mdmon - apply update > + */ > dprintf("imsm:prepare space list for update_reshape\n"); > for (dl = super->devlist; dl; > dl = dl->next) { I really don't like have code in super-* calling "mdmon_running". It feels like a layering violation. imsm_reshape_super should: - *always* change the metadata as required - if st->update_tail is non-null, then a metadata update should also be added with append_metadata_update The common code will then call sync_metadata() to either flush the updates through mdmon or write them directly. NeilBrown -- 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