linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@cse.unsw.edu.au>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-raid@vger.kernel.org
Subject: [PATCH] md - 3 of 4 - Set max_sectors for raid0 only, not for all raid levels.
Date: Tue, 26 Aug 2003 09:26:07 +1000	[thread overview]
Message-ID: <E19rQit-0002By-00@notabene> (raw)

### Comments for ChangeSet
raid1 and multipath have not concept of a chunksize, so basing
max_sectors on it is obviously wrong.
Similary 'linear' has a very different concept of chunksize and
max_sectors doesn't apply.
raid5 does have relevant chunk_size concept, but it has code to
effectively handle any chunksize.  

So we only need to set max_sectors based on chunk_size in raid0.

 ----------- Diffstat output ------------
 ./drivers/md/md.c    |    6 ------
 ./drivers/md/raid0.c |    7 +++++++
 2 files changed, 7 insertions(+), 6 deletions(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2003-08-24 08:07:12.000000000 +1000
+++ ./drivers/md/md.c	2003-08-24 08:07:18.000000000 +1000
@@ -1610,12 +1610,6 @@ static int do_md_run(mddev_t * mddev)
 	spin_unlock(&pers_lock);
 
 	blk_queue_make_request(mddev->queue, mddev->pers->make_request);
-	printk("%s: setting max_sectors to %d, segment boundary to %d\n",
-		disk->disk_name,
-		chunk_size >> 9,
-		(chunk_size>>1)-1);
-	blk_queue_max_sectors(mddev->queue, chunk_size >> 9);
-	blk_queue_segment_boundary(mddev->queue, (chunk_size>>1) - 1);
 	mddev->queue->queuedata = mddev;
 
 	err = mddev->pers->run(mddev);

diff ./drivers/md/raid0.c~current~ ./drivers/md/raid0.c
--- ./drivers/md/raid0.c~current~	2003-08-24 07:03:43.000000000 +1000
+++ ./drivers/md/raid0.c	2003-08-24 08:07:18.000000000 +1000
@@ -231,6 +231,13 @@ static int raid0_run (mddev_t *mddev)
 	mdk_rdev_t *rdev;
 	struct list_head *tmp;
 
+	printk("md%d: setting max_sectors to %d, segment boundary to %d\n",
+	       mdidx(mddev),
+	       mddev->chunk_size >> 9,
+	       (mddev->chunk_size>>1)-1);
+	blk_queue_max_sectors(mddev->queue, mddev->chunk_size >> 9);
+	blk_queue_segment_boundary(mddev->queue, (mddev->chunk_size>>1) - 1);
+
 	conf = kmalloc(sizeof (raid0_conf_t), GFP_KERNEL);
 	if (!conf)
 		goto out;

                 reply	other threads:[~2003-08-25 23:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E19rQit-0002By-00@notabene \
    --to=neilb@cse.unsw.edu.au \
    --cc=linux-raid@vger.kernel.org \
    --cc=torvalds@osdl.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).