For swsusp, I need to write to the swap space.
I used technique similar to this:
static void mark_swapfiles(swp_entry_t prev, int mode)
union diskpage *cur;
cur = (union diskpage *)get_free_page(GFP_ATOMIC);
panic("Out of memory in mark_swapfiles");
/* XXX: this is dirty hack to get first page of swap file */
entry = SWP_ENTRY(root_swap, 0);
rw_swap_page_nolock(READ, entry, (char *) cur);
... modify cur->fields...
rw_swap_page_nolock(WRITE, entry, (char *)cur);
It seems not to work any more. Some io is done, but it is not
synchronous any more, and it does not seem to hit the disk.
What am I doing wrong, or is there something wrong in 2.5.12/2.5.13?
-- (about SSSCA) "I don't say this lightly. However, I really think that the U.S. no longer is classifiable as a democracy, but rather as a plutocracy." --hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to firstname.lastname@example.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:28 EST