<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>patch here to avoid race condition:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>[root@darkstar md]# diff -u dm-raid1.orig.c dm-raid1.c <BR>---
dm-raid1.orig.c 2005-06-16 14:17:04.000000000
+0800<BR>+++ dm-raid1.c 2005-06-16 14:18:25.000000000 +0800<BR>@@ -404,7
+404,6 @@<BR> <BR>
read_lock(&rh->hash_lock);<BR>
reg = __rh_lookup(rh, region);<BR>-
read_unlock(&rh->hash_lock);<BR> <BR>
if (atomic_dec_and_test(®->pending))
{<BR>
spin_lock_irqsave(&rh->region_lock, flags);<BR>@@ -418,6 +417,7
@@<BR>
should_wake = 1;<BR>
}<BR> <BR>+
read_unlock(&rh->hash_lock);<BR>
if
(should_wake)<BR>
wake();<BR> }</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV>Sincerely,<BR> AiM9 <<A
href="mailto:zhaoqian@aaastor.com">zhaoqian@aaastor.com</A>></DIV></BODY></HTML>