lkml.org 
[lkml]   [2003]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] Make pmdisk suspend more reliable
From
Hi Patrick & all,

Here's a little patch to make pmdisk suspend to disk work on my old
laptop. Basically at least the PMDISK_SIG never got to the disk, and
finding the suspend image would fail without this patch. The patch is
against linux-2.6.0-test7.

Pls cc me on any replies, I'm not on the list right now.

Regards,

Tony


--- linux-2.6.0-test7/kernel/power/pmdisk.c-orig 2003-10-12 18:35:58.000000000 +0300
+++ linux-2.6.0-test7/kernel/power/pmdisk.c 2003-10-12 19:00:32.000000000 +0300
@@ -35,6 +35,7 @@


extern int pmdisk_arch_suspend(int resume);
+extern int wakeup_bdflush(long nr_pages);

#define __ADDRESS(x) ((unsigned long) phys_to_virt(x))
#define ADDRESS(x) __ADDRESS((x) << PAGE_SHIFT)
@@ -372,6 +373,9 @@
goto FreePagedir;

error = mark_swapfiles(prev);
+
+ /* Make sure the data gets to disk */
+ wakeup_bdflush(0);
Done:
return error;
FreePagedir:
\
 
 \ /
  Last update: 2005-03-22 13:49    [W:1.615 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site