From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: heinzm@redhat.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] md: raid10: add prerequisite to run underneath dm-raid
Date: Tue, 03 May 2016 13:51:22 -0400 [thread overview]
Message-ID: <1462297882.16133.40.camel@HansenPartnership.com> (raw)
In-Reply-To: <1462297378-771-1-git-send-email-heinzm@redhat.com>
On Tue, 2016-05-03 at 19:42 +0200, heinzm@redhat.com wrote:
> From: Heinz Mauelshagen <heinzm@redhat.com>
>
> In case md runs underneath the dm-raid target, the mddev does not
> have a request queue or gendisk, thus avoid accesses to it.
>
> This patch adds two missing conditionals to the raid10 personality.
-EWRONGLIST. drivers/md is handled by linux-raid@vger.kernel.org
James
>
> Signed-of-by: Heinz Mauelshagen <heinzm@redhat.com>
>
> ---
> drivers/md/raid10.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index e3fd725..84e24e6 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -3782,8 +3782,10 @@ static int raid10_resize(struct mddev *mddev,
> sector_t sectors)
> return ret;
> }
> md_set_array_sectors(mddev, size);
> - set_capacity(mddev->gendisk, mddev->array_sectors);
> - revalidate_disk(mddev->gendisk);
> + if (mddev->queue) {
> + set_capacity(mddev->gendisk, mddev->array_sectors);
> + revalidate_disk(mddev->gendisk);
> + }
> if (sectors > mddev->dev_sectors &&
> mddev->recovery_cp > oldsize) {
> mddev->recovery_cp = oldsize;
> @@ -4593,8 +4595,10 @@ static void raid10_finish_reshape(struct mddev
> *mddev)
> set_bit(MD_RECOVERY_NEEDED, &mddev
> ->recovery);
> }
> mddev->resync_max_sectors = size;
> - set_capacity(mddev->gendisk, mddev->array_sectors);
> - revalidate_disk(mddev->gendisk);
> + if (mddev->queue) {
> + set_capacity(mddev->gendisk, mddev
> ->array_sectors);
> + revalidate_disk(mddev->gendisk);
> + }
> } else {
> int d;
> for (d = conf->geo.raid_disks ;
next prev parent reply other threads:[~2016-05-03 17:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 17:42 [PATCH] md: raid10: add prerequisite to run underneath dm-raid heinzm
2016-05-03 17:51 ` James Bottomley [this message]
2016-05-03 17:58 ` Heinz Mauelshagen
-- strict thread matches above, loose matches on Subject: below --
2016-05-03 17:43 heinzm
2016-05-09 15:50 heinzm
2016-05-09 15:50 heinzm
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=1462297882.16133.40.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=heinzm@redhat.com \
--cc=linux-scsi@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 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.