From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Brown Subject: Re: [PATCH 07/13] Grow: add missing raid4 geometries to geo_map() Date: Tue, 23 Nov 2010 15:16:32 +1100 Message-ID: <20101123151632.1ee99cc5@notabene.brown> References: <20101118080359.29508.50648.stgit@gklab-170-111.igk.intel.com> <20101118092217.29508.33761.stgit@gklab-170-111.igk.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20101118092217.29508.33761.stgit@gklab-170-111.igk.intel.com> Sender: linux-raid-owner@vger.kernel.org To: Krzysztof Wojcik Cc: linux-raid@vger.kernel.org, wojciech.neubauer@intel.com, adam.kwolek@intel.com, dan.j.williams@intel.com, ed.ciechanowski@intel.com List-Id: linux-raid.ids On Thu, 18 Nov 2010 10:22:17 +0100 Krzysztof Wojcik wrote: > From: Dan Williams > > They are equivalent to their raid5 versions and let the reshape code > optionally use either. > > Signed-off-by: Dan Williams > --- > restripe.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/restripe.c b/restripe.c > index 3074693..c2fbe5b 100644 > --- a/restripe.c > +++ b/restripe.c > @@ -46,6 +46,7 @@ static int geo_map(int block, unsigned long long stripe, int raid_disks, > switch(level*100 + layout) { > case 000: > case 400: > + case 400 + ALGORITHM_PARITY_N: > case 500 + ALGORITHM_PARITY_N: > /* raid 4 isn't messed around by parity blocks */ > if (block == -1) > @@ -75,6 +76,7 @@ static int geo_map(int block, unsigned long long stripe, int raid_disks, > if (block == -1) return pd; > return (pd + 1 + block) % raid_disks; > > + case 400 + ALGORITHM_PARITY_0: > case 500 + ALGORITHM_PARITY_0: > return block + 1; > I'm not sure about this. In the kernel, raid4 ignores the 'layout'. So it seems safest to do the same in mdadm, and always use a level of '5' when we want PARITY_0. Why is this needed exactly? Thanks, NeilBrown