* [md PATCH 1/5] md: Fix: max_disks limit set for external metadata
@ 2010-06-09 14:20 Kwolek, Adam
2010-06-16 4:50 ` Neil Brown
0 siblings, 1 reply; 3+ messages in thread
From: Kwolek, Adam @ 2010-06-09 14:20 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed
(md: Online Capacity Expansion for IMSM)
If max_disks limit is not set, md doesn't allow for reconfiguration and starting reshape. For external metadata this limit is not set.
It is set for native meta during metadata reading.
Limit max_disks is not used for external meta, so we can set it to value (MD_SB_DISKS) that will not block reshape.
---
drivers/md/md.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c index dfbba92..9cec771 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5380,6 +5380,8 @@ static int update_raid_disks(mddev_t *mddev, int raid_disks)
/* change the number of raid disks */
if (mddev->pers->check_reshape == NULL)
return -EINVAL;
+ if (mddev->external)
+ mddev->max_disks = MD_SB_DISKS;
if (raid_disks <= 0 ||
raid_disks >= mddev->max_disks)
return -EINVAL;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [md PATCH 1/5] md: Fix: max_disks limit set for external metadata
2010-06-09 14:20 [md PATCH 1/5] md: Fix: max_disks limit set for external metadata Kwolek, Adam
@ 2010-06-16 4:50 ` Neil Brown
2010-06-16 11:25 ` Kwolek, Adam
0 siblings, 1 reply; 3+ messages in thread
From: Neil Brown @ 2010-06-16 4:50 UTC (permalink / raw)
To: Kwolek, Adam
Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed
On Wed, 9 Jun 2010 15:20:37 +0100
"Kwolek, Adam" <adam.kwolek@intel.com> wrote:
> (md: Online Capacity Expansion for IMSM)
> If max_disks limit is not set, md doesn't allow for reconfiguration and starting reshape. For external metadata this limit is not set.
> It is set for native meta during metadata reading.
> Limit max_disks is not used for external meta, so we can set it to value (MD_SB_DISKS) that will not block reshape.
> ---
>
> drivers/md/md.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c index dfbba92..9cec771 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -5380,6 +5380,8 @@ static int update_raid_disks(mddev_t *mddev, int raid_disks)
> /* change the number of raid disks */
> if (mddev->pers->check_reshape == NULL)
> return -EINVAL;
> + if (mddev->external)
> + mddev->max_disks = MD_SB_DISKS;
> if (raid_disks <= 0 ||
> raid_disks >= mddev->max_disks)
> return -EINVAL;
>
commit 233fca36bb439eadcad28500b5139fed7c64a0ae
should make this unnecessary.
NeilBrown
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [md PATCH 1/5] md: Fix: max_disks limit set for external metadata
2010-06-16 4:50 ` Neil Brown
@ 2010-06-16 11:25 ` Kwolek, Adam
0 siblings, 0 replies; 3+ messages in thread
From: Kwolek, Adam @ 2010-06-16 11:25 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed
> -----Original Message-----
> From: Neil Brown [mailto:neilb@suse.de]
> Sent: Wednesday, June 16, 2010 6:51 AM
> To: Kwolek, Adam
> Cc: linux-raid@vger.kernel.org; Williams, Dan J; Ciechanowski, Ed
> Subject: Re: [md PATCH 1/5] md: Fix: max_disks limit set for external
> metadata
>
> On Wed, 9 Jun 2010 15:20:37 +0100
> "Kwolek, Adam" <adam.kwolek@intel.com> wrote:
>
> > (md: Online Capacity Expansion for IMSM) If max_disks limit is not
> > set, md doesn't allow for reconfiguration and starting reshape. For
> external metadata this limit is not set.
> > It is set for native meta during metadata reading.
> > Limit max_disks is not used for external meta, so we can set it to
> value (MD_SB_DISKS) that will not block reshape.
> > ---
> >
> > drivers/md/md.c | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/md/md.c b/drivers/md/md.c index dfbba92..9cec771
> > 100644
> > --- a/drivers/md/md.c
> > +++ b/drivers/md/md.c
> > @@ -5380,6 +5380,8 @@ static int update_raid_disks(mddev_t *mddev,
> int raid_disks)
> > /* change the number of raid disks */
> > if (mddev->pers->check_reshape == NULL)
> > return -EINVAL;
> > + if (mddev->external)
> > + mddev->max_disks = MD_SB_DISKS;
> > if (raid_disks <= 0 ||
> > raid_disks >= mddev->max_disks)
> > return -EINVAL;
> >
>
>
> commit 233fca36bb439eadcad28500b5139fed7c64a0ae
> should make this unnecessary.
>
> NeilBrown
Yes, you are right.
Commit you pointed makes this patch unnecessary.
BR
Adam
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-16 11:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09 14:20 [md PATCH 1/5] md: Fix: max_disks limit set for external metadata Kwolek, Adam
2010-06-16 4:50 ` Neil Brown
2010-06-16 11:25 ` Kwolek, Adam
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).