linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Phil Genera <pg@fivesevenfive.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: Crash during raid6 reshape, now cannot restart?
Date: Sat, 11 Dec 2010 09:02:53 +1100	[thread overview]
Message-ID: <20101211090253.2f2b7a7c@notabene.brown> (raw)
In-Reply-To: <20101211074305.5f55c4b4@notabene.brown>

On Sat, 11 Dec 2010 07:43:05 +1100 Neil Brown <neilb@suse.de> wrote:

> > 
> > raid5: reshape_position too early for auto-recovery - aborting.  
> 
> Something must be going wrong with the math in raid5:
> 
>                if (mddev->delta_disks < 0
>                     ? (here_new * mddev->new_chunk_sectors <=
>                        here_old * mddev->chunk_sectors)
>                     : (here_new * mddev->new_chunk_sectors >=
>                        here_old * mddev->chunk_sectors)) {
>                         /* Reading from the same stripe as writing to - bad */
>                         printk(KERN_ERR "raid5: reshape_position too early for "
>                                "auto-recovery - aborting.\n");
>                         return -EINVAL;
>                 }
> 
> there 'here_new* new_chunk_size' must be over-flowing.  So the size of the
> array must only just fit into sector_t.
> On and arm5 you would need to have CONFIG_LBD set - do you know if it is?
> 
> I guess I need to make that code more robust when sector_t doesn't have lots
> more bits that the size of the device...
> 
> If you can compile your own kernel, you should be able to get it to work
> easily.  If not ... complain to whoever provided you with a kernel.
> 

No ... I take that back.  here_new is the result of dividing the
reshape_position by chunk_sector times number of disks.
So multiplying by chunk_sectors again is not going to cause an overflow.

So I have no idea what if going on here.... maybe a compiler bug?

If you compile your own kernel, I would put some printk's in
drives/md/raid5.c just before the above code to see what the values of the
variables are, and to see what the results of the multiplications will be.

NeilBrown


  reply	other threads:[~2010-12-10 22:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-10 17:05 Crash during raid6 reshape, now cannot restart? Phil Genera
2010-12-10 20:43 ` Neil Brown
2010-12-10 22:02   ` Neil Brown [this message]
2010-12-10 22:11     ` Phil Genera
     [not found]       ` <AANLkTin=_nTe8RgrOSyhPbcU26EDxJ=Sx177CzB2MD58@mail.gmail.com>
2010-12-12  3:12         ` Phil Genera

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=20101211090253.2f2b7a7c@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=pg@fivesevenfive.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).