From: Sebastian Riemer <sebastian.riemer@profitbricks.com>
To: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Cc: Linux RAID Mailing List <linux-raid@vger.kernel.org>
Subject: Re: Reason for md raid1 max_sectors_kb limited to 127?
Date: Mon, 07 May 2012 16:14:42 +0200 [thread overview]
Message-ID: <4FA7D8D2.8030906@profitbricks.com> (raw)
In-Reply-To: <4FA7D678.4080106@itwm.fraunhofer.de>
On 07/05/12 16:04, Bernd Schubert wrote:
> I think you need something like this. I thought there already went
> something in in recent kernel, will check it later on today.
>
>
>
> Index: 2.6.32.13/drivers/md/raid0.c
> ===================================================================
> --- 2.6.32.13.orig/drivers/md/raid0.c
> +++ 2.6.32.13/drivers/md/raid0.c
> @@ -96,6 +96,7 @@ static int create_strip_zones(mddev_t *m
> int cnt;
> char b[BDEVNAME_SIZE];
> raid0_conf_t *conf = kzalloc(sizeof(*conf), GFP_KERNEL);
> + unsigned int opt_io_size;
>
> if (!conf)
> return -ENOMEM;
> @@ -256,9 +257,16 @@ static int create_strip_zones(mddev_t *m
> goto abort;
> }
>
> + /*
> + * To send large IOs to the drives we need sufficient segments
> + * for our own queue first.
> + */
> + opt_io_size = (mddev->chunk_sectors << 9) * mddev->raid_disks;
> + blk_queue_max_phys_segments(mddev->queue, opt_io_size >> PAGE_SHIFT);
> + blk_queue_max_hw_segments(mddev->queue, opt_io_size >> PAGE_SHIFT);
> +
> blk_queue_io_min(mddev->queue, mddev->chunk_sectors << 9);
> - blk_queue_io_opt(mddev->queue,
> - (mddev->chunk_sectors << 9) * mddev->raid_disks);
> + blk_queue_io_opt(mddev->queue, opt_io_size);
>
> printk(KERN_INFO "raid0: done.\n");
> mddev->private = conf;
>
>
> Cheers,
> Bernd
>
Thanks for your answer, Bernd!
I've tested 3.3 and 3.4-rc1 and there it works. Now, I'll test latest
linux-3.2.y from linux-stable. Perhaps I'll start a "git bisect" later
on if the fix commit isn't that obvious.
Cheers,
Sebastian
next prev parent reply other threads:[~2012-05-07 14:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 9:41 Reason for md raid1 max_sectors_kb limited to 127? Sebastian Riemer
2012-05-07 11:18 ` NeilBrown
2012-05-07 11:34 ` Sebastian Riemer
2012-05-07 14:04 ` Bernd Schubert
2012-05-07 14:14 ` Sebastian Riemer [this message]
[not found] ` <CABYL=ToyVwRGOkVs63iBgfWeTsjDQ=ofsYC4hgAVpABrWbHUjA@mail.gmail.com>
2012-05-07 14:47 ` Bernd Schubert
2012-05-07 15:33 ` Sebastian Riemer
2012-05-07 16:13 ` Bernd Schubert
-- strict thread matches above, loose matches on Subject: below --
2012-05-08 16:07 Sebastian Riemer
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=4FA7D8D2.8030906@profitbricks.com \
--to=sebastian.riemer@profitbricks.com \
--cc=bernd.schubert@itwm.fraunhofer.de \
--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).