From: "majianpeng" <majianpeng@gmail.com>
To: Neil Brown <neilb@suse.de>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: [PATCH] md/raid10:using conf->chunk_mask instead "chunk_secotrs - 1"
Date: Tue, 17 Apr 2012 16:49:50 +0800 [thread overview]
Message-ID: <201204171649462965325@gmail.com> (raw)
From 2c637bca4e50e87f7b4e6b3abce27f8cd935fd92 Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@gmail.com>
Date: Tue, 17 Apr 2012 16:47:07 +0800
Subject: [PATCH] md/raid10:using conf->chunk_mask instead "chunk_secotrs -
1".
Signed-off-by: majianpeng <majianpeng@gmail.com>
---
drivers/md/raid10.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index c8dbb84..5734d92 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -601,7 +601,7 @@ static int raid10_mergeable_bvec(struct request_queue *q,
unsigned int bio_sectors = bvm->bi_size >> 9;
if (conf->near_copies < conf->raid_disks) {
- max = (chunk_sectors - ((sector & (chunk_sectors - 1))
+ max = (chunk_sectors - ((sector & conf->chunk_mask)
+ bio_sectors)) << 9;
if (max < 0)
/* bio_add cannot handle a negative return */
--
1.7.5.4
--------------
majianpeng
2012-04-17
next reply other threads:[~2012-04-17 8:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 8:49 majianpeng [this message]
2012-04-17 9:11 ` [PATCH] md/raid10:using conf->chunk_mask instead "chunk_secotrs - 1" NeilBrown
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=201204171649462965325@gmail.com \
--to=majianpeng@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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.