All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: "Wesley W. Terpstra" <wesley@terpstra.ca>
Cc: linux-raid@vger.kernel.org
Subject: Re: BUG drivers/md/md.c: data-offset reshape renders array unloadable
Date: Thu, 5 Feb 2015 17:14:02 +1100	[thread overview]
Message-ID: <20150205171402.7dc2f394@notabene.brown> (raw)
In-Reply-To: <CAA-O0Xjw8H1nPsi+MsQnrLxv=gC2tj3=W=t3aMnCE6ESUHMF8w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]

On Sun, 25 Jan 2015 17:46:20 +0100 "Wesley W. Terpstra" <wesley@terpstra.ca>
wrote:

> On Sat, Jan 24, 2015 at 11:23 PM, Wesley W. Terpstra <wesley@terpstra.ca> wrote:
> >> First, it is obviously the last test in super_1_load that is rejecting
> >> the array. The superblock reports more sectors than are calculated, so
> >> the check
> >>         if (sectors < le64_to_cpu(sb->data_size)) {
> >> fails.
> >
> > Thus, an alternative explanation could be that the the sb->data_size
> > was not updated after the reshape completed.
> 
> I can confirm that this was the problem.
> 
> I manually modified my super block using the attached quick hack.
> Thereafter I was able to reassemble the array and fsck everything
> successfully.
> 
> I will try and see if I can reproduce the problem tomorrow. It's a
> pretty nasty bug to have a reshape complete and render your array
> unassemblable.

Thanks for all the details and analysis!!!

A v1.2 array normally has data from the data_offset all the way to the end of
the device (maybe rounded  down to chunk size).

So you normally wouldn't be able to increase the data_offset from 5120 to
8192 unless you first reduced the --size of the array (having reduced the
size of any filesystem first).
Did you do that?  That should have reduced sb->data_size appropriately.

If you did --grow the --size first, that should have reduced sb->data_size.
If you didn't the --grow --data-offset should have failed.

Obviously one of those 'should's didn't...

NeilBrown

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  reply	other threads:[~2015-02-05  6:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-24 21:44 BUG drivers/md/md.c: data-offset reshape renders array unloadable Wesley W. Terpstra
2015-01-24 22:23 ` Wesley W. Terpstra
2015-01-25 16:46   ` Wesley W. Terpstra
2015-02-05  6:14     ` NeilBrown [this message]
2015-02-05  8:17       ` Wesley W. Terpstra

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=20150205171402.7dc2f394@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=wesley@terpstra.ca \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.