diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-04-16 03:47:06 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-05-07 03:21:55 +0200 |
commit | 6fb03f3a40805a412c9b285010ffdc2e7563f81b (patch) | |
tree | 05698049e0f21bc265952aaa75a708ea006ca56a /fs/f2fs/data.c | |
parent | f2fs: avoid BUG_ON when mouting corrupted image having garbage blocks (diff) | |
download | linux-6fb03f3a40805a412c9b285010ffdc2e7563f81b.tar.xz linux-6fb03f3a40805a412c9b285010ffdc2e7563f81b.zip |
f2fs: adjust free mem size to flush dentry blocks
If so many dirty dentry blocks are cached, not reached to the flush condition,
we should fall into livelock in balance_dirty_pages.
So, let's consider the mem size for the condition.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index b5cd6d1c9320..6b89b2517edf 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -863,7 +863,8 @@ static int f2fs_write_data_pages(struct address_space *mapping, return 0; if (S_ISDIR(inode->i_mode) && wbc->sync_mode == WB_SYNC_NONE && - get_dirty_dents(inode) < nr_pages_to_skip(sbi, DATA)) + get_dirty_dents(inode) < nr_pages_to_skip(sbi, DATA) && + available_free_memory(sbi, DIRTY_DENTS)) goto skip_write; diff = nr_pages_to_write(sbi, DATA, wbc); |