All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm-raid1: wake the thread after adding bios to the queue
@ 2009-07-13 13:33 Mikulas Patocka
  2009-07-20 12:52 ` Alasdair G Kergon
  0 siblings, 1 reply; 3+ messages in thread
From: Mikulas Patocka @ 2009-07-13 13:33 UTC (permalink / raw)
  To: Alasdair G Kergon; +Cc: dm-devel

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@redhat.com>
CC: stable@kernel.org

---
 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);
 	}
 
 	/*

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dm-raid1: wake the thread after adding bios to the queue
  2009-07-13 13:33 [PATCH] dm-raid1: wake the thread after adding bios to the queue Mikulas Patocka
@ 2009-07-20 12:52 ` Alasdair G Kergon
  2009-07-20 13:11   ` Mike Snitzer
  0 siblings, 1 reply; 3+ messages in thread
From: Alasdair G Kergon @ 2009-07-20 12:52 UTC (permalink / raw)
  To: Mikulas Patocka; +Cc: dm-devel

On Mon, Jul 13, 2009 at 09:33:06AM -0400, Mikulas Patocka wrote:
> Recent dm-raid1 clustering patch violate this rule.
 
Upstream git commit id?

Alasdair

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dm-raid1: wake the thread after adding bios to the queue
  2009-07-20 12:52 ` Alasdair G Kergon
@ 2009-07-20 13:11   ` Mike Snitzer
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Snitzer @ 2009-07-20 13:11 UTC (permalink / raw)
  To: agk; +Cc: dm-devel, Mikulas Patocka

On Mon, Jul 20 2009 at  8:52am -0400,
Alasdair G Kergon <agk@redhat.com> wrote:

> On Mon, Jul 13, 2009 at 09:33:06AM -0400, Mikulas Patocka wrote:
> > Recent dm-raid1 clustering patch violate this rule.
>  
> Upstream git commit id?

7513c2a761d69d2a93f17146b3563527d3618ba0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-20 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13 13:33 [PATCH] dm-raid1: wake the thread after adding bios to the queue Mikulas Patocka
2009-07-20 12:52 ` Alasdair G Kergon
2009-07-20 13:11   ` Mike Snitzer

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.