Commit Graph

10 Commits

Author SHA1 Message Date
Krishna Konda 99c705afbc fs: yaffs2: initialize delayed workqueue before using it
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>
2013-11-26 23:29:26 -08:00
Stephen Boyd 5f57b3a788 fs: yaffs: Update for new procfs API
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>
2013-09-04 17:24:20 -07:00
Sujit Reddy Thumma 38280e2e78 fs: yaffs2: get rid of write_super
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>
2013-09-04 17:24:20 -07:00
Sujit Reddy Thumma 53b38de55c fs: yaffs2: Fix compilation issues with 3.7 kernel
Commits 312b63fb and 00cd8dd3 modified arguments to
i_op->create and i_op->lookup methods. Fix yaffs_create()
and yaffs_lookup() accordingly.

Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2013-09-04 17:24:19 -07:00
Sujit Reddy Thumma 6357bcfcc3 fs: yaffs2: Add null pointer check before dereferencing inode
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>
2013-09-04 17:24:18 -07:00
Stephen Boyd a1d4437f5f yaffs2: Update for kernel 3.4
Update yaffs2 for newer kernel constructs and the removal of the
big kernel lock.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-09-04 17:24:18 -07:00
Larry Bassel e7bbf3b2f3 yaffs: add interface to cleancache
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)
2013-09-04 17:24:17 -07:00
Sujit Reddy Thumma 70898ff3c7 fs: yaffs: Use deferable timer for background operations
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)
2013-09-04 17:24:16 -07:00
Dima Zavin 477ce7ce8e fs: yaffs: don't force YAFFS_TRACE_ALWAYS for all trace levels
Change-Id: I9ddc676382d26aef7f12145d412fe670cb486317
Signed-off-by: Dima Zavin <dima@android.com>
2013-09-04 17:24:16 -07:00
Arve Hjønnevåg cea60fc92c fs: yaffs: Import yaffs from Thu Dec 23 13:31:37 2010 +1300
commit ddf33fed15c2376bfb602d62dd018c63fce60df8
Author: Timothy Manning <tfhmanning@gmail.com>
Date:   Thu Dec 23 13:31:37 2010 +1300

    yaffs updated direct/timothy_tests/quick_tests
    Signed-off-by: Timothy Manning <tfhmanning@gmail.com>

Change-Id: I5bbe5a05277bdf8a6fe188bbe4c77725b3fa2aae
Signed-off-by: Dima Zavin <dima@android.com>
2013-09-04 17:24:15 -07:00