From: Heinz Mauelshagen <heinzm@redhat.com>
To: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] md: raid5: add prerequisite to run underneath dm-raid
Date: Mon, 9 May 2016 23:31:04 +0200 [thread overview]
Message-ID: <57310198.9070001@redhat.com> (raw)
In-Reply-To: <wrfj8tzjrmbd.fsf@redhat.com>
On 05/09/2016 10:47 PM, Jes Sorensen wrote:
> heinzm@redhat.com writes:
>> 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.
>>
>> This patch adds a missing conditional to the raid5 personality.
>>
>>
>> Signed-of-by: Heinz Mauelshagen <heinzm@redhat.com>
>>
>>
>> ---
>> drivers/md/raid5.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
>> index 8ab8b65..ce79ce6 100644
>> --- a/drivers/md/raid5.c
>> +++ b/drivers/md/raid5.c
>> @@ -7574,8 +7574,10 @@ static void raid5_finish_reshape(struct mddev *mddev)
>>
>> if (mddev->delta_disks > 0) {
>> md_set_array_sectors(mddev, raid5_size(mddev, 0, 0));
>> - 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);
>> + }
> Since we're in the code taste mode, this is a reminder that kernel code
> is 80 characters per line :)
Hehe, gotta shorten > 20 lines in raid5.c alone then :-)
Heinz
>
> Jes
prev parent reply other threads:[~2016-05-09 21:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 15:50 [PATCH] md: raid5: add prerequisite to run underneath dm-raid heinzm
2016-05-09 16:42 ` Shaohua Li
2016-05-09 20:47 ` Jes Sorensen
2016-05-09 21:31 ` Heinz Mauelshagen [this message]
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=57310198.9070001@redhat.com \
--to=heinzm@redhat.com \
--cc=Jes.Sorensen@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).