The sync_work delayed workqueue needs to be initialized before
its gets used for the first time or else it will result in a crash.
Change-Id: I7f627b1cbe5c68031707f3b3943381a2353fce74
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
The procfs API has changed in 3.10. Port this code to use
seq_printf() and friends so that we can keep it around on 3.10
kernels.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Commit f0cd2dbb kills the VFS '->write_super' method along with
's_dirt' flag to avoid unnecessary wakeups every 5secs which
check for dirty super blocks to write out. The solution is to make
individual file system take care of writing dirty super blocks
by themselves. For YAFFS, schedule a delay job to do file system sync
only when the super blocks are touched.
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
In yaffs_rename(), d_entry->d_inode can be NULL if the
target directory doesn't exist or if there is any race
condition such as target directory being deleted while
renaming another directory to target directory name.
Avoid dereferencing d_inode in such cases.
CRs-Fixed: 360748
Change-Id: If95b4992f1056fea78f2e1bd54253cd5c8aac93d
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Cleancache requires a small amount of code to be added
to a filesystem's implementation so that clean page
cache pages from a filesystem of that type may be
recognized and stored in/retrieved from cleancache.
Change-Id: I94c3fc8817ab66e2c54f7b2c6c474dd2321d9806
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
(cherry picked from commit eb93161d9746b2aa0ac534d1da88a33480d21905)
Use deferable timer in background operations thread,
so that it won't cause unnecessary wakeups. Typically,
wakeups are seen in the range 60ms to 2secs (for HZ=100)
after the thread is scheduled out. In general, during this
delay the processor can go into sleep, if there is no other
activity. Since, the work done in this background operation
is not critical and can be handled as soon as when timer
expires and processor wakes up for other critical events,
we mark the timer responsible for wakeup of this thread
as deferable timer. Otherwise, the processor wakesup
unnecessarily to handle the background operations causing
higher power consumption in idle state.
Change-Id: Ic168525c6b33600ad23017d00ea9723cf8a738d2
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
(cherry picked from commit 4e239c0cbfc9070ff0c006a92eaafd52243b47a0)