Hi! > I only had limited success with swsusp on 2.5.36 (the only time I've tried > it), but this patch seems to fix the problem with the JFS kernel > threads.
How did it fail? If you give it a lot of memory, and pray a bit, it should work :-). > If you're running on a patched 2.4 kernel, this patch may not apply cleanly, > but it should be pretty easy to hand-merge. > > Please let me know if it works for you. I don't have JFS installed, sorry. Patch looks good. Disk in my main machine is dying, so I have bad problems right now. Please push patch to linus yourself. Pavel > Thanks, > Shaggy > > ===== fs/jfs/jfs_logmgr.c 1.33 vs edited ===== > --- 1.33/fs/jfs/jfs_logmgr.c Thu Sep 12 15:28:56 2002 > +++ edited/fs/jfs/jfs_logmgr.c Wed Sep 18 13:11:19 2002 > @@ -66,6 +66,7 @@ > #include <linux/completion.h> > #include <linux/buffer_head.h> /* for sync_blockdev() */ > #include <linux/bio.h> > +#include <linux/suspend.h> > #include "jfs_incore.h" > #include "jfs_filsys.h" > #include "jfs_metapage.h" > @@ -2141,12 +2142,17 @@ > lbmStartIO(bp); > spin_lock_irq(&log_redrive_lock); > } > - add_wait_queue(&jfs_IO_thread_wait, &wq); > - set_current_state(TASK_INTERRUPTIBLE); > - spin_unlock_irq(&log_redrive_lock); > - schedule(); > - current->state = TASK_RUNNING; > - remove_wait_queue(&jfs_IO_thread_wait, &wq); > + if (current->flags & PF_FREEZE) { > + spin_unlock_irq(&log_redrive_lock); > + refrigerator(PF_IOTHREAD); > + } else { > + add_wait_queue(&jfs_IO_thread_wait, &wq); > + set_current_state(TASK_INTERRUPTIBLE); > + spin_unlock_irq(&log_redrive_lock); > + schedule(); > + current->state = TASK_RUNNING; > + remove_wait_queue(&jfs_IO_thread_wait, &wq); > + } > } while (!jfs_stop_threads); > > jFYI(1,("jfsIOWait being killed!\n")); > ===== fs/jfs/jfs_txnmgr.c 1.25 vs edited ===== > --- 1.25/fs/jfs/jfs_txnmgr.c Thu Sep 12 15:28:56 2002 > +++ edited/fs/jfs/jfs_txnmgr.c Wed Sep 18 13:14:34 2002 > @@ -47,6 +47,7 @@ > #include <linux/vmalloc.h> > #include <linux/smp_lock.h> > #include <linux/completion.h> > +#include <linux/suspend.h> > #include "jfs_incore.h" > #include "jfs_filsys.h" > #include "jfs_metapage.h" > @@ -2789,8 +2790,6 @@ > complete(&jfsIOwait); > > do { > - DECLARE_WAITQUEUE(wq, current); > - > LAZY_LOCK(flags); > restart: > WorkDone = 0; > @@ -2825,12 +2824,19 @@ > if (WorkDone) > goto restart; > > - add_wait_queue(&jfs_commit_thread_wait, &wq); > - set_current_state(TASK_INTERRUPTIBLE); > - LAZY_UNLOCK(flags); > - schedule(); > - current->state = TASK_RUNNING; > - remove_wait_queue(&jfs_commit_thread_wait, &wq); > + if (current->flags & PF_FREEZE) { > + LAZY_UNLOCK(flags); > + refrigerator(PF_IOTHREAD); > + } else { > + DECLARE_WAITQUEUE(wq, current); > + > + add_wait_queue(&jfs_commit_thread_wait, &wq); > + set_current_state(TASK_INTERRUPTIBLE); > + LAZY_UNLOCK(flags); > + schedule(); > + current->state = TASK_RUNNING; > + remove_wait_queue(&jfs_commit_thread_wait, &wq); > + } > } while (!jfs_stop_threads); > > if (TxAnchor.unlock_queue) > @@ -2981,7 +2987,6 @@ > complete(&jfsIOwait); > > do { > - DECLARE_WAITQUEUE(wq, current); > /* > * write each inode on the anonymous inode list > */ > @@ -3030,12 +3035,20 @@ > } > /* Add anon_list2 back to anon_list */ > list_splice_init(&TxAnchor.anon_list2, &TxAnchor.anon_list); > - add_wait_queue(&jfs_sync_thread_wait, &wq); > - set_current_state(TASK_INTERRUPTIBLE); > - TXN_UNLOCK(); > - schedule(); > - current->state = TASK_RUNNING; > - remove_wait_queue(&jfs_sync_thread_wait, &wq); > + > + if (current->flags & PF_FREEZE) { > + TXN_UNLOCK(); > + refrigerator(PF_IOTHREAD); > + } else { > + DECLARE_WAITQUEUE(wq, current); > + > + add_wait_queue(&jfs_sync_thread_wait, &wq); > + set_current_state(TASK_INTERRUPTIBLE); > + TXN_UNLOCK(); > + schedule(); > + current->state = TASK_RUNNING; > + remove_wait_queue(&jfs_sync_thread_wait, &wq); > + } > } while (!jfs_stop_threads); > > jFYI(1, ("jfs_sync being killed\n")); -- Casualities in World Trade Center: ~3k dead inside the building, cryptography in U.S.A. and free speech in Czech Republic. _______________________________________________ Jfs-discussion mailing list [EMAIL PROTECTED] http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jfs-discussion