[PATCH] dm-raid1: wake the thread after adding bios to the queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi. I found this bug when reading dm-raid1.

Mikulas

---

The rule is that whether anything is being added on ms->reads, ms->writes or
ms->failures and the list was empty before, we must call wakeup_mirrord (for
immediate processing) or delayed_wake (for delayed processing).

Otherwise the thread wouldn't be woken up and bio could be sitting on the
list indefinitely.

Recent dm-raid1 clustering patch violate this rule.

Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>
CC: stable@xxxxxxxxxx

---
 drivers/md/dm-raid1.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.31-rc2-devel/drivers/md/dm-raid1.c
===================================================================
--- linux-2.6.31-rc2-devel.orig/drivers/md/dm-raid1.c	2009-07-13 15:14:55.000000000 +0200
+++ linux-2.6.31-rc2-devel/drivers/md/dm-raid1.c	2009-07-13 15:15:40.000000000 +0200
@@ -638,6 +638,7 @@ static void do_writes(struct mirror_set 
 		spin_lock_irq(&ms->lock);
 		bio_list_merge(&ms->writes, &requeue);
 		spin_unlock_irq(&ms->lock);
+		delayed_wake(ms);
 	}
 
 	/*

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux