--- ocfs2.old/src/journal.c 2004-04-20 16:58:23.000000000 +0800 +++ ocfs2/src/journal.c 2004-04-25 08:57:02.000000000 +0800 @@ -1646,30 +1646,6 @@ LOG_TRACE_STR("FLUSH_EVENT: timed out"); break; case -EINTR: - /* journal shutdown has asked me to do - * one last commit cache and then exit */ - if (journal->state == OCFS_JOURNAL_IN_SHUTDOWN) - finish = 1; - if (signal_pending(current)) { - /* ignore the actual signal */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - dequeue_signal_lock(current, - ¤t->blocked, - &info); -#else -#ifdef HAVE_NPTL - spin_lock_irq (¤t->sighand->siglock); - dequeue_signal(¤t->blocked, - &info); - spin_unlock_irq(¤t->sighand->siglock); -#else - spin_lock_irq(¤t->sigmask_lock); - dequeue_signal(¤t->blocked, - &info); - spin_unlock_irq(¤t->sigmask_lock); -#endif /* !HAVE_NPTL */ -#endif /* 2.4.x kernel */ - } LOG_TRACE_STR("FLUSH_EVENT: interrupted"); break; case 0: @@ -1680,8 +1680,26 @@ break; } + if (signal_pending(current)) { + /* ignore the actual signal */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + dequeue_signal_lock(current, ¤t->blocked, &info); +#else +#ifdef HAVE_NPTL + spin_lock_irq (¤t->sighand->siglock); + dequeue_signal(¤t->blocked, &info); + spin_unlock_irq(¤t->sighand->siglock); +#else + spin_lock_irq(¤t->sigmask_lock); + dequeue_signal(¤t->blocked, &info); + spin_unlock_irq(¤t->sigmask_lock); +#endif /* !HAVE_NPTL */ +#endif /* 2.4.x kernel */ + } + if ((OcfsGlobalCtxt.flags & OCFS_FLAG_SHUTDOWN_VOL_THREAD) || - (osb->osb_flags & OCFS_OSB_FLAGS_BEING_DISMOUNTED)) + (osb->osb_flags & OCFS_OSB_FLAGS_BEING_DISMOUNTED) || + (journal->state == OCFS_JOURNAL_IN_SHUTDOWN)) finish = 1; //if (!osb->needs_flush && status != 0) --- ocfs2.old/src/file.c 2004-04-20 16:58:23.000000000 +0800 +++ ocfs2/src/file.c 2004-04-25 08:57:08.000000000 +0800 @@ -357,6 +357,11 @@ ocfs_up_sem (&(OCFS_I(inode)->main_res)); ocfs_sync_inode(inode); + if(osb->commit && osb->commit->c_task) { + send_sig (SIGINT, osb->commit->c_task, 0); + yield(); + } + if (last_close) { if (inode->i_data.nrpages) ocfs_truncate_inode_pages(inode, 0); --- ocfs2.old/src/namei.c 2004-04-25 11:05:59.398985280 +0800 +++ ocfs2/src/namei.c 2004-04-25 11:06:54.390625280 +0800 @@ -632,6 +632,10 @@ } inode->i_nlink--; + if(osb->commit && osb->commit->c_task) { + send_sig (SIGINT, osb->commit->c_task, 0); + yield(); + } retval = 0; } @@ -1280,6 +1284,11 @@ if (new_inode) fsync_inode_buffers(old_inode); + + if(osb->commit && osb->commit->c_task) { + send_sig (SIGINT, osb->commit->c_task, 0); + yield(); + } } old_inode->i_nlink++;