fix big 116 -- umount cause crash after some operation
Ling
PATCH 1/1 fix big 116 -- umount cause crash after some operation
before umount, all the lock shall be released first. this patch can resolve the problem
------------------------------------------------
super.c (working copy) renamed from super.c (revision 1370) +2 -0
@@ -224,6 +224,7 @@ tid_t target; sb->s_dirt = 0; + ocfs_commit_cache(OCFS2_SB(sb)); target = log_start_commit(OCFS2_SB(sb)->journal->k_journal, NULL); log_wait_commit(OCFS2_SB(sb)->journal->k_journal, target); return 0;
@@ -234,6 +235,7 @@ tid_t target; sb->s_dirt = 0; + ocfs_commit_cache(OCFS2_SB(sb)); if (journal_start_commit(OCFS2_SB(sb)->journal->k_journal, &target))
{
if (wait)
log_wait_commit(OCFS2_SB(sb)->journal->k_journal,journal.c (working copy) renamed from journal.c (revision 1370) +2 -2
@@ -61,7 +61,7 @@ struct inode *inode); static int ocfs_recover_node(struct _ocfs_super *osb, int node_num); static int __ocfs_recovery_thread(void *arg); -static int ocfs_commit_cache (ocfs_super * osb); +int ocfs_commit_cache (ocfs_super * osb); static int ocfs_wait_on_mount(ocfs_super *osb); static void ocfs_handle_move_locks(ocfs_journal *journal, ocfs_journal_handle *handle);
@@ -149,7 +149,7 @@ * This is in journal.c for lack of a better place. * */ -static int ocfs_commit_cache(ocfs_super *osb) +int ocfs_commit_cache(ocfs_super *osb) { int status = 0, tmpstat; ocfs_journal * journal = NULL;
-------------------
Ling Xiaofeng(Daniel)
Intel China Software Lab.
iNet: 8-752-1243
8621-52574545-1243(O)
[email protected]
Opinions are my own and don't represent those of my employer
PATCH 1/1 fix big 116 -- umount cause crash after some operation
Quoted 2 lines · Xiaofeng
before umount, all the lock shall be released first. this patch can resolve the problem
This isn't the way we want to handle this. The way it's supposed to work is that the umount process sends a signal to the commit thread to shutdown and then waits on it's last set of checkpoints / releases. I'd much rather fix what's broken than patch over it :)
I'm actually looking at this bug right now and I think it's due to our signal handling code...
--Mark
Quoted 54 lines
------------------------------------------------
Index:super.c
===================================================================super.c (working copy) renamed from super.c (revision 1370) +2
-0@@ -224,6 +224,7 @@ tid_t target; sb->s_dirt = 0; + ocfs_commit_cache(OCFS2_SB(sb)); target = log_start_commit(OCFS2_SB(sb)->journal->k_journal, NULL); log_wait_commit(OCFS2_SB(sb)->journal->k_journal, target); return 0;@@ -234,6 +235,7 @@ tid_t target; sb->s_dirt = 0; + ocfs_commit_cache(OCFS2_SB(sb)); if (journal_start_commit(OCFS2_SB(sb)->journal->k_journal, &target)) { if (wait)log_wait_commit(OCFS2_SB(sb)->journal->k_journal,Index:
journal.c
===================================================================journal.c (working copy) renamed from journal.c (revision 1370) +2
-3@@ -61,7 +61,7 @@ struct inode *inode); static int ocfs_recover_node(struct _ocfs_super *osb, int node_num); static int __ocfs_recovery_thread(void *arg); -static int ocfs_commit_cache (ocfs_super * osb); +int ocfs_commit_cache (ocfs_super * osb); static int ocfs_wait_on_mount(ocfs_super *osb); static void ocfs_handle_move_locks(ocfs_journal *journal, ocfs_journal_handle *handle);@@ -149,7 +149,7 @@ * This is in journal.c for lack of a better place. * */ -static int ocfs_commit_cache(ocfs_super *osb) +int ocfs_commit_cache(ocfs_super *osb) { int status = 0, tmpstat; ocfs_journal * journal = NULL; -------------------Ling Xiaofeng(Daniel)
Intel China Software Lab.
iNet: 8-752-1243
8621-52574545-1243(O)
Quoted 6 lines
[email protected]
Opinions are my own and don't represent those of my employer
_______________________________________________
Ocfs2-devel mailing list [email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel
--
Mark Fasheh
Software Developer, Oracle Corp
[email protected]