From: NeilBrown <neilb@suse.de>
To: majianpeng <majianpeng@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: [PATCH 2/4] md/raid5: Tune judgements order.
Date: Mon, 4 Mar 2013 12:49:40 +1100 [thread overview]
Message-ID: <20130304124940.398eda52@notabene.brown> (raw)
In-Reply-To: <201302281550441221244@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
On Thu, 28 Feb 2013 15:50:47 +0800 majianpeng <majianpeng@gmail.com> wrote:
> To reduce the unnecessary function call in certain condtitions,it should
> tune judgements order.
>
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
> drivers/md/raid5.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 59c0569..bd49623 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -4665,9 +4665,10 @@ static inline sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int
> *skipped = 1;
> return rv;
> }
> - if (!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) &&
> - !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) &&
> - !conf->fullsync && sync_blocks >= STRIPE_SECTORS) {
> + if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) &&
> + !conf->fullsync &&
> + !bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) &&
> + sync_blocks >= STRIPE_SECTORS) {
> /* we can skip this block, and probably more */
> sync_blocks /= STRIPE_SECTORS;
> *skipped = 1;
applied, thanks (after fixing up the formatting).
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2013-03-04 1:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 7:50 [PATCH 2/4] md/raid5: Tune judgements order majianpeng
2013-03-04 1:49 ` NeilBrown [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=20130304124940.398eda52@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=majianpeng@gmail.com \
/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).