[PATCH v2 3/3] UBIFS: do not start the commit if there is nothing to commit
Artem Bityutskiy
dedekind1 at gmail.com
Tue Jan 18 02:36:25 EST 2011
On Tue, 2011-01-18 at 09:30 +0200, Artem Bityutskiy wrote:
> From: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
>
> 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 at linutronix.de>
> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Adrian, I've also pushed these 3 patches to ubifs-2.6.git / master.
Could you please validate them?
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list