f2fs: fix dirty page accounting when redirty
authorChao Yu <chao2.yu@samsung.com>
Fri, 28 Feb 2014 02:12:05 +0000 (10:12 +0800)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Fri, 28 Feb 2014 04:09:08 +0000 (13:09 +0900)
We should de-account dirty counters for page when redirty in ->writepage().

Wu Fengguang described in 'commit 971767caf632190f77a40b4011c19948232eed75':
"writeback: fix dirtied pages accounting on redirty
De-account the accumulative dirty counters on page redirty.

Page redirties (very common in ext4) will introduce mismatch between
counters (a) and (b)

a) NR_DIRTIED, BDI_DIRTIED, tsk->nr_dirtied
b) NR_WRITTEN, BDI_WRITTEN

This will introduce systematic errors in balanced_rate and result in
dirty page position errors (ie. the dirty pages are no longer balanced
around the global/bdi setpoints)."

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/checkpoint.c
fs/f2fs/data.c
fs/f2fs/node.c

Simple merge
diff --cc fs/f2fs/data.c
Simple merge
diff --cc fs/f2fs/node.c
Simple merge