lkml.org 
[lkml]   [2003]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: ext3 umount hangs
Steven Pratt <slpratt@austin.ibm.com> wrote:
>
> Here is the trace of the hung process:
>
> umount D 00000001 290213268 18747 18746 (NOTLB)
> Call Trace:
> [<c01a1ae8>] journal_kill_thread+0xa8/0xe0

whoops. I bet you're seeing this when using some script which does the
unmount.

Might this help?


diff -puN fs/jbd/journal.c~kjournald-shutdown-fix fs/jbd/journal.c
--- 25/fs/jbd/journal.c~kjournald-shutdown-fix 2003-06-19 12:58:43.000000000 -0700
+++ 25-akpm/fs/jbd/journal.c 2003-06-19 12:58:43.000000000 -0700
@@ -161,7 +161,7 @@ loop:
del_timer_sync(journal->j_commit_timer);
journal_commit_transaction(journal);
spin_lock(&journal->j_state_lock);
- goto loop;
+ goto end_loop;
}

wake_up(&journal->j_wait_done_commit);
@@ -210,7 +210,7 @@ loop:
journal->j_commit_request = transaction->t_tid;
jbd_debug(1, "woke because of timeout\n");
}
-
+end_loop:
if (!(journal->j_flags & JFS_UNMOUNT))
goto loop;

@@ -230,12 +230,16 @@ static void journal_start_thread(journal

static void journal_kill_thread(journal_t *journal)
{
+ spin_lock(&journal->j_state_lock);
journal->j_flags |= JFS_UNMOUNT;

while (journal->j_task) {
wake_up(&journal->j_wait_commit);
+ spin_unlock(&journal->j_state_lock);
wait_event(journal->j_wait_done_commit, journal->j_task == 0);
+ spin_lock(&journal->j_state_lock);
}
+ spin_unlock(&journal->j_state_lock);
}

/*
_

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

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