From: NeilBrown <neilb@suse.de>
To: Jes.Sorensen@redhat.com
Cc: dledford@redhat.com, linux-raid@vger.kernel.org
Subject: Re: [PATCH v2] Avoid OOPS when reshaping raid1 to raid0
Date: Tue, 27 Mar 2012 14:35:39 +1100 [thread overview]
Message-ID: <20120327143539.32cedf3c@notabene.brown> (raw)
In-Reply-To: <1332750685-31643-1-git-send-email-Jes.Sorensen@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 878 bytes --]
On Mon, 26 Mar 2012 10:31:25 +0200 Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
>
> raid1 arrays do not have the notion of chunk size. Calculate the
> larges chunk sector size we can use to avoid a divide by zero OOPS
> when aligning the size of the new array to the chunk size.
>
> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Thanks.
Applied with one change:
> /* Set new parameters */
> mddev->new_level = 0;
> mddev->new_layout = 0;
> mddev->new_chunk_sectors = 128; /* by default set chunk size to 64k */
I changed the above line to
mddev->new_chunk_sectors = chunksect;
as that makes more sense.
Thanks,
NeilBrown
> + mddev->chunk_sectors = chunksect;
> mddev->delta_disks = 1 - mddev->raid_disks;
> mddev->raid_disks = 1;
> /* make sure it will be not marked as dirty */
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2012-03-27 3:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-26 8:31 [PATCH v2] Avoid OOPS when reshaping raid1 to raid0 Jes.Sorensen
2012-03-27 3:35 ` NeilBrown [this message]
2012-03-27 7:17 ` Jes Sorensen
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=20120327143539.32cedf3c@notabene.brown \
--to=neilb@suse.de \
--cc=Jes.Sorensen@redhat.com \
--cc=dledford@redhat.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).