linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: "Kwolek, Adam" <adam.kwolek@intel.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Ciechanowski, Ed" <ed.ciechanowski@intel.com>,
	"Neubauer, Wojciech" <Wojciech.Neubauer@intel.com>
Subject: Re: [PATCH 3/8] imsm: FIX: Size is already set in metadata
Date: Thu, 3 Feb 2011 21:42:48 +1100	[thread overview]
Message-ID: <20110203214248.0f30fdb6@notabene.brown> (raw)
In-Reply-To: <905EDD02F158D948B186911EB64DB3D1770B8253@irsmsx503.ger.corp.intel.com>

On Thu, 3 Feb 2011 09:52:46 +0000 "Kwolek, Adam" <adam.kwolek@intel.com>
wrote:

> > -----Original Message-----
> > From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
> > owner@vger.kernel.org] On Behalf Of NeilBrown
> > Sent: Thursday, February 03, 2011 7:45 AM
> > To: Kwolek, Adam
> > Cc: linux-raid@vger.kernel.org; Williams, Dan J; Ciechanowski, Ed;
> > Neubauer, Wojciech
> > Subject: Re: [PATCH 3/8] imsm: FIX: Size is already set in metadata
> > 
> > On Tue, 01 Feb 2011 14:49:20 +0100 Adam Kwolek <adam.kwolek@intel.com>
> > wrote:
> > 
> > > In metadata size is set already during migration initialization.
> > > There is no reason for second /the same/ calculation.
> > >
> > > Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> > > ---
> > >
> > >  super-intel.c |    5 +----
> > >  1 files changed, 1 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/super-intel.c b/super-intel.c
> > > index 42f7065..62b13b0 100644
> > > --- a/super-intel.c
> > > +++ b/super-intel.c
> > > @@ -5185,15 +5185,12 @@ static int imsm_set_array_state(struct
> > active_array *a, int consistent)
> > >  				/* round array size down to closest MB */
> > >  				array_blocks = (array_blocks >>
> > SECT_PER_MB_SHIFT)
> > >  					<< SECT_PER_MB_SHIFT;
> > > -				dev->size_low = __cpu_to_le32((__u32)
> > array_blocks);
> > > -				dev->size_high = __cpu_to_le32((__u32)
> > (array_blocks >> 32));
> > >  				a->info.custom_array_size = array_blocks/2;
> > >  				a->check_reshape = 1; /* encourage manager to
> > update
> > >  						       * array size
> > >  						       */
> > > -				super->updates_pending++;
> > >  				imsm_progress_container_reshape(super);
> > > -			}
> > > +			}
> > >  		}
> > >  	}
> > >
> > >
> > 
> > Doing the same calculation in two placed does seem wrong, but are you
> > sure this is the right one to remove?
> > 
> > The available space in the array does not change until the reshape
> > completes.  So changing dev->size_{low,high} during initialisation
> > seems wrong.
> > 
> > Are you able to confirm what the windows driver does?
> 
> Yes (look below).
> 
> > 
> > If we do set the size early, then we have to be careful to reduce to
> > the
> > original size when assembling an array that is in the middle of
> > reshape.
> 
> Yes (as you describes in your roadmap, it will be part of 3.2.1 code changes/investigation).
> Size for array with reshape in progress process, should be calculated based on second map information.
> 
> > 
> > So I won't apply this patch now, and will wait for you to confirm when
> > the
> > windows driver updates dev->size_{low,high}
> > 
> > Thanks,
> > NeilBrown
> 
> I've (double) checked Windows driver behavior. Array size is set during expansion initialization (first metadata update).

That sounds like a weird design decision, but I guess we have to work with
it.  I've applied that patch now.
These patches are still going in to my devel-3.2 branch.

Thanks,
NeilBrown


> This means, that code for size changes on reshape end has to be removed as it was proposed.
> For volume expansion, size in imsm metadata has to be set in 2 places/cases:
> 1. in metadata update during reshape update processing for first array(it is implemented)
> 2. In initialization reshape by set_array_state on second array (it is implemented)
> 
> BR
> Adam
> 
> > --
> > 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-02-03 10:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 13:48 [PATCH 0/8] Set of fixes for expansion Adam Kwolek
2011-02-01 13:49 ` [PATCH 1/8] FIX: Last checkpoint is not set Adam Kwolek
2011-02-01 13:49 ` [PATCH 2/8] imsm: FIX: array size is wrong Adam Kwolek
2011-02-03  6:41   ` NeilBrown
2011-02-03  9:56     ` Kwolek, Adam
2011-02-01 13:49 ` [PATCH 3/8] imsm: FIX: Size is already set in metadata Adam Kwolek
2011-02-03  6:45   ` NeilBrown
2011-02-03  9:52     ` Kwolek, Adam
2011-02-03 10:42       ` NeilBrown [this message]
2011-02-01 13:49 ` [PATCH 4/8] imsm: FIX: put expansion finalization in to one place Adam Kwolek
2011-02-01 13:49 ` [PATCH 5/8] imsm: fix: imsm_num_data_members() can return error Adam Kwolek
2011-02-01 13:49 ` [PATCH 6/8] FIX: Do not set array size after reshape in mdadm Adam Kwolek
2011-02-03  6:56   ` NeilBrown
2011-02-03 10:08     ` Kwolek, Adam
2011-02-03 10:44       ` NeilBrown
2011-02-01 13:49 ` [PATCH 7/8] imsm: FIX: Debug strings cleanup Adam Kwolek
2011-02-01 13:50 ` [PATCH 8/8] imsm: move common code for array size calculation to function Adam Kwolek
2011-02-03  7:22 ` [PATCH 0/8] Set of fixes for expansion 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=20110203214248.0f30fdb6@notabene.brown \
    --to=neilb@suse.de \
    --cc=Wojciech.Neubauer@intel.com \
    --cc=adam.kwolek@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    /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).