aboutsummaryrefslogtreecommitdiff
path: root/fs/ubifs/scan.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-01-16 19:22:02 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-01-25 10:21:13 +0200
commit944fdef52ca9fc0fe077578f51201ef397e30abe (patch)
treec24c589edf911fcb66b0b1968fe3b283193787ff /fs/ubifs/scan.c
parent18d1d7fbcc260e67d249bf90b454d8cf34288453 (diff)
UBIFS: do not start the commit if there is nothing to commit
This patch fixes suboptimal UBIFS 'sync_fs()' implementation which causes flash I/O even if the file-system is synchronized. E.g., a 'printk()' in the MTD erasure function (e.g., 'nand_erase_nand()') can show that for every 'sync' shell command UBIFS erases at least one eraseblock. So '$ while true; do sync; done' will cause huge amount of flash I/O. The reason for this is that UBIFS commits in 'sync_fs()', and starts the commit even if there is nothing to commit, e.g., it anyway changes the log. This patch adds a check in the 'do_commit()' UBIFS functions which prevents the commit if there is nothing to commit. Reported-by: Hans J. Koch <hjk@linutronix.de> Tested-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/scan.c')
0 files changed, 0 insertions, 0 deletions