linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: "Williams, Dan J" <dan.j.williams@intel.com>
Cc: linux-raid@vger.kernel.org,
	Anna Czarnowska <anna.czarnowska@intel.com>,
	marcin.labun@intel.com, ed.ciechanowski@intel.com
Subject: Re: [PATCH 5/9] imsm: fix reserved sectors for spares
Date: Tue, 30 Aug 2011 12:20:36 +1000	[thread overview]
Message-ID: <20110830122036.357e63f0@notabene.brown> (raw)
In-Reply-To: <CABE8wwv08oPwU4maaBULCoy993v=uhGny0_gTWFdYHDsoYLvEg@mail.gmail.com>

On Fri, 26 Aug 2011 12:51:18 -0700 "Williams, Dan J"
<dan.j.williams@intel.com> wrote:

> On Thu, Aug 25, 2011 at 7:14 PM, Dan Williams <dan.j.williams@intel.com> wrote:
> > Different OROMs reserve different amounts of space for the migration area.
> > When activating a spare minimize the reserved space otherwise a valid spare
> > can be prevented from joining an array with a migration area smaller than
> > IMSM_RESERVED_SECTORS.
> >
> > This may result in an array that cannot be reshaped, but that is less
> > surprising than not being able to rebuild a degraded array.
> > imsm_reserved_sectors() already reports the minimal value which adds to
> > the confusion when trying rebuild an array because mdadm -E indicates
> > that the device has enough space.
> >
> > Cc: Anna Czarnowska <anna.czarnowska@intel.com>
> > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> > ---
> >  super-intel.c |   11 ++++++++++-
> >  1 files changed, 10 insertions(+), 1 deletions(-)
> >
> > diff --git a/super-intel.c b/super-intel.c
> > index 0347183..193e0d0 100644
> > --- a/super-intel.c
> > +++ b/super-intel.c
> > @@ -833,7 +833,16 @@ static struct extent *get_extents(struct intel_super *super, struct dl *dl)
> >        struct extent *rv, *e;
> >        int i;
> >        int memberships = count_memberships(dl, super);
> > -       __u32 reservation = MPB_SECTOR_CNT + IMSM_RESERVED_SECTORS;
> > +       __u32 reservation;
> > +
> > +       /* trim the reserved area for spares, so they can join any array
> > +        * regardless of whether the OROM has assigned sectors from the
> > +        * IMSM_RESERVED_SECTORS region
> > +        */
> > +       if (dl->index == -1)
> > +               reservation = MPB_SECTOR_CNT;
> 
> Anna rightly points out that this could probably be safely made
> bigger.  As it stands this applies to too broad an array of disks.  I
> think a happy medium (until we can nail down the forward compatibility
> of older oroms, v8 in this case) is to detect the case where the disk
> is being activated for rebuild and if it is at least as large as one
> of the existing members truncate the reserved region to the same size
> as the other member.  That way we are at least compatible with
> whatever agent created the array in the first instance.
> 

I think you are saying that I can go ahead and apply this patch, but that it
might get improved upon in the future .... I hope that is right ?

> But this also comes back to the problem of duplicating the array
> configuration.  It becomes difficult to make things the same size
> unless the orom version (reserved region layout) is specified.

Yes, that is occasionally a serious problem.  As metadata becomes more
flexible it become harder to reproduce exact configuration.

Maybe I need a --no-default option to --create to ensure no defaults are used.
Then some sort of generic 
    --config-param foo=bar
which creates a dictionary of foo=bar assignments which are used by the
metadata to fill in any detail that they would normally fill from defaults.

Sounds a bit heavy-weight though...

NeilBrown

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-08-30  2:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26  2:13 [PATCH 0/9] recovering an imsm raid5 array Dan Williams
2011-08-26  2:14 ` [PATCH 1/9] imsm: fix max disks per array Dan Williams
2011-08-26  2:14 ` [PATCH 2/9] imsm: fix, stop metadata updates to newly failed devices Dan Williams
2011-08-26  2:14 ` [PATCH 3/9] imsm: fix display spares Dan Williams
2011-08-26  2:14 ` [PATCH 4/9] sysfs: fix sysfs_disk_to_scsi_id Dan Williams
2011-08-26  2:14 ` [PATCH 5/9] imsm: fix reserved sectors for spares Dan Williams
2011-08-26 19:51   ` Williams, Dan J
2011-08-30  2:20     ` NeilBrown [this message]
2011-09-06 20:42       ` Williams, Dan J
2011-09-19 12:57         ` Czarnowska, Anna
2011-09-21  4:45           ` NeilBrown
2011-08-26  2:14 ` [PATCH 6/9] mdmon: fix, close spare activation race Dan Williams
2011-08-26  2:14 ` [PATCH 7/9] imsm: support 'missing' devices at Create Dan Williams
2011-08-30  2:26   ` NeilBrown
2011-08-26  2:14 ` [PATCH 8/9] util: allow regular files through test_partition() Dan Williams
2011-08-26  2:14 ` [PATCH 9/9] mdadm: 'dump' support Dan Williams
2011-08-30  2:58   ` NeilBrown
2011-08-30 10:12     ` Alexander Kühn
2013-05-16  5:11       ` NeilBrown
2011-08-26 11:06 ` [PATCH 0/9] recovering an imsm raid5 array linbloke
2011-08-30  3:13 ` NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110830122036.357e63f0@notabene.brown \
    --to=neilb@suse.de \
    --cc=anna.czarnowska@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=marcin.labun@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).