public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Lippers-Hollmann" <s.L-H@gmx.de>
To: gregkh@suse.de
Cc: linux-kernel@vger.kernel.org, neilb@suse.de, king.br@gmail.com,
	stable@kernel.org
Subject: Re: patch md-raid5-allow-for-more-than-2-31-chunks.patch added to 2.6.33-stable tree
Date: Thu, 22 Apr 2010 04:08:30 +0200	[thread overview]
Message-ID: <201004220408.33822.s.L-H@gmx.de> (raw)
In-Reply-To: <12718801381479@kroah.org>

Hi

On Thursday 22 April 2010, gregkh@suse.de wrote:
> This is a note to let you know that we have just queued up the patch titled
> 
>     Subject: md/raid5: allow for more than 2^31 chunks.
> 
> to the 2.6.33-stable tree.  Its filename is
> 
>     md-raid5-allow-for-more-than-2-31-chunks.patch
> 
> A git repo of this tree can be found at 
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> 
> From 35f2a591192d0a5d9f7fc696869c76f0b8e49c3d Mon Sep 17 00:00:00 2001
> From: NeilBrown <neilb@suse.de>
> Date: Tue, 20 Apr 2010 14:13:34 +1000
> Subject: md/raid5: allow for more than 2^31 chunks.
> 
> From: NeilBrown <neilb@suse.de>
> 
> commit 35f2a591192d0a5d9f7fc696869c76f0b8e49c3d upstream.
> 
> With many large drives and small chunk sizes it is possible
> to create a RAID5 with more than 2^31 chunks.  Make sure this
> works.
> 
> Reported-by: Brett King <king.br@gmail.com>
> Signed-off-by: NeilBrown <neilb@suse.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

This patch, as part of the current 2.6.33 stable queue, breaks compiling
on i386 (CONFIG_LBDAF=y) for me (amd64 builds fine):

[...]
  BUILD   arch/x86/boot/bzImage
Root device is (254, 6)
Setup is 12700 bytes (padded to 12800 bytes).
System is 2415 kB
CRC db6fa5fa
Kernel: arch/x86/boot/bzImage is ready  (#1)
ERROR: "__umoddi3" [drivers/md/raid456.ko] undefined!

reverting just this patch fixes the problem for me.

Current Debian/ unstable:
ii  binutils                                            2.20.1-7                   The GNU assembler, linker and binary utilities
ii  gcc-4.4                                             4.4.3-9                    The GNU C compiler
ii  make                                                3.81-8                     An utility for Directing compilation.

Regards
	Stefan Lippers-Hollmann

-- 
> ---
>  drivers/md/raid5.c |   19 +++++++------------
>  1 file changed, 7 insertions(+), 12 deletions(-)
> 
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -1649,8 +1649,8 @@ static sector_t raid5_compute_sector(rai
>  				     int previous, int *dd_idx,
>  				     struct stripe_head *sh)
>  {
> -	long stripe;
> -	unsigned long chunk_number;
> +	sector_t stripe;
> +	sector_t chunk_number;
>  	unsigned int chunk_offset;
>  	int pd_idx, qd_idx;
>  	int ddf_layout = 0;
> @@ -1670,17 +1670,12 @@ static sector_t raid5_compute_sector(rai
>  	 */
>  	chunk_offset = sector_div(r_sector, sectors_per_chunk);
>  	chunk_number = r_sector;
> -	BUG_ON(r_sector != chunk_number);
>  
>  	/*
>  	 * Compute the stripe number
>  	 */
> -	stripe = chunk_number / data_disks;
> -
> -	/*
> -	 * Compute the data disk and parity disk indexes inside the stripe
> -	 */
> -	*dd_idx = chunk_number % data_disks;
> +	stripe = chunk_number;
> +	*dd_idx = sector_div(stripe, data_disks);
>  
>  	/*
>  	 * Select the parity disk based on the user selected algorithm.
> @@ -1869,14 +1864,14 @@ static sector_t compute_blocknr(struct s
>  				 : conf->algorithm;
>  	sector_t stripe;
>  	int chunk_offset;
> -	int chunk_number, dummy1, dd_idx = i;
> +	sector_t chunk_number;
> +	int dummy1, dd_idx = i;
>  	sector_t r_sector;
>  	struct stripe_head sh2;
>  
>  
>  	chunk_offset = sector_div(new_sector, sectors_per_chunk);
>  	stripe = new_sector;
> -	BUG_ON(new_sector != stripe);
>  
>  	if (i == sh->pd_idx)
>  		return 0;
> @@ -1969,7 +1964,7 @@ static sector_t compute_blocknr(struct s
>  	}
>  
>  	chunk_number = stripe * data_disks + i;
> -	r_sector = (sector_t)chunk_number * sectors_per_chunk + chunk_offset;
> +	r_sector = chunk_number * sectors_per_chunk + chunk_offset;
>  
>  	check = raid5_compute_sector(conf, r_sector,
>  				     previous, &dummy1, &sh2);

       reply	other threads:[~2010-04-22  2:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <12718801381479@kroah.org>
2010-04-22  2:08 ` Stefan Lippers-Hollmann [this message]
2010-04-22  2:40   ` patch md-raid5-allow-for-more-than-2-31-chunks.patch added to 2.6.33-stable tree Neil Brown
2010-04-22 11:36     ` Stefan Lippers-Hollmann
2010-04-23  3:11       ` Greg KH
2010-04-23 11:13         ` Neil Brown
2010-04-23 11:53         ` Stefan Lippers-Hollmann

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=201004220408.33822.s.L-H@gmx.de \
    --to=s.l-h@gmx.de \
    --cc=gregkh@suse.de \
    --cc=king.br@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=stable@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