lkml.org 
[lkml]   [1999]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: All the problems with 2.2.8/2.3.x and bdflush/update
On Fri, 14 May 1999, Zack Weinberg wrote:

>You may be right. There's a huge race in wakeup_bdflush. If asked to
>wait, it calls run_task_queue(&tq_disk) after waking bdflush but
>BEFORE sleeping on bdflush_done. That's been there for a really long
>time, I guess it is easier to trigger with my changes applied.

You are completly right about this. This is a completly untested fix alone
against 2.2.9 (my buffer code fixed this too but only incidentally, and
that's why I didn't thought too much about your words above until now).

--- linux/fs/buffer.c Fri May 14 20:22:39 1999
+++ linux/fs/buffer.c Mon May 17 03:04:51 1999
@@ -1561,11 +1561,11 @@
{
if (current == bdflush_tsk)
return;
- wake_up(&bdflush_wait);
- if (wait) {
+ if (wait)
run_task_queue(&tq_disk);
+ wake_up(&bdflush_wait);
+ if (wait)
sleep_on(&bdflush_done);
- }
}


Andrea Arcangeli


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.075 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site