lkml.org 
[lkml]   [2004]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectSuspend 2 merge: 15/51: Disable pdflush during suspend.
    From
    Date
    Here we disable pdflush once we've finished syncing data to disk. We
    might be writing to a swap file, and don't want to corrupt the user's
    disk by writing invalid data to their superblock.


    diff -ruN 504-disable-pdflush-during-suspend-old/mm/page-writeback.c 504-disable-pdflush-during-suspend-new/mm/page-writeback.c
    --- 504-disable-pdflush-during-suspend-old/mm/page-writeback.c 2004-11-03 21:54:16.000000000 +1100
    +++ 504-disable-pdflush-during-suspend-new/mm/page-writeback.c 2004-11-04 16:27:40.000000000 +1100
    @@ -29,6 +29,7 @@
    #include <linux/sysctl.h>
    #include <linux/cpu.h>
    #include <linux/syscalls.h>
    +#include <linux/suspend.h>

    /*
    * The maximum number of pages to writeout in a single bdflush/kupdate
    @@ -369,6 +370,12 @@
    .for_kupdate = 1,
    };

    + if (test_suspend_state(SUSPEND_DISABLE_SYNCING)) {
    + start_jif = jiffies;
    + next_jif = start_jif + (dirty_writeback_centisecs * HZ) / 100;
    + goto out;
    + }
    +
    sync_supers();

    get_writeback_state(&wbs);
    @@ -389,6 +396,8 @@
    }
    nr_to_write -= MAX_WRITEBACK_PAGES - wbc.nr_to_write;
    }
    +
    +out:
    if (time_before(next_jif, jiffies + HZ))
    next_jif = jiffies + HZ;
    if (dirty_writeback_centisecs)

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:08    [W:0.021 / U:0.912 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site