From: Qi Yong <qiyong@fc-cn.com>
To: akpm@osdl.org
Cc: neilb@suse.de, linux-kernel@vger.kernel.org
Subject: [patch] raid5_end_write_request spinlock fix
Date: Fri, 21 Apr 2006 20:59:49 +0800 [thread overview]
Message-ID: <20060421125949.GA15550@localhost.localdomain> (raw)
Hello,
Reduce the raid5_end_write_request() spinlock window.
Signed-off-by: Coywolf Qi Hunt <qiyong@fc-cn.com>
---
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 3184360..9c24377 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -581,7 +581,6 @@ static int raid5_end_write_request (stru
struct stripe_head *sh = bi->bi_private;
raid5_conf_t *conf = sh->raid_conf;
int disks = sh->disks, i;
- unsigned long flags;
int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags);
if (bi->bi_size)
@@ -599,16 +598,14 @@ static int raid5_end_write_request (stru
return 0;
}
- spin_lock_irqsave(&conf->device_lock, flags);
if (!uptodate)
md_error(conf->mddev, conf->disks[i].rdev);
rdev_dec_pending(conf->disks[i].rdev, conf->mddev);
-
clear_bit(R5_LOCKED, &sh->dev[i].flags);
set_bit(STRIPE_HANDLE, &sh->state);
- __release_stripe(conf, sh);
- spin_unlock_irqrestore(&conf->device_lock, flags);
+ release_stripe(sh);
+
return 0;
}
--
Coywolf Qi Hunt
next reply other threads:[~2006-04-21 12:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-21 12:59 Qi Yong [this message]
2006-04-22 5:45 ` [patch] raid5_end_write_request spinlock fix Neil Brown
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=20060421125949.GA15550@localhost.localdomain \
--to=qiyong@fc-cn.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox