linux_dsm_epyc7002/fs/f2fs
Jaegeuk Kim 7d82db8316 f2fs: add f2fs_balance_fs in several interfaces
The f2fs_balance_fs() is to check the number of free sections and decide whether
it needs to conduct cleaning or not. If there are not enough free sections, the
cleaning job should be started.

In order to control an amount of free sections even under high utilization, f2fs
should call f2fs_balance_fs at all the VFS interfaces that are able to produce
dirty pages.
This patch adds the function calls in the missing interfaces as follows.

1. f2fs_setxattr()
The f2fs_setxattr() produces dirty node pages so that we should call
f2fs_balance_fs() either likewise doing in other VFS interfaces such as
f2fs_lookup(), f2fs_mkdir(), and so on.

2. f2fs_sync_file()
We should guarantee serving free sections for syncing metadata during fsync.
Previously, there is no space check before triggering checkpoint and
sync_node_pages.
Therefore, if a bunch of fsync calls are triggered under 100% of FS utilization,
f2fs is able to be faced with no free sections, resulting in BUG_ON().

3. f2fs_sync_fs()
Before calling write_checkpoint(), we should guarantee that there are minimum
free sections.

4. f2fs_write_inode()
f2fs_write_inode() is also able to produce dirty node pages.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-01-11 15:09:17 +09:00
..
acl.c f2fs: avoid null dereference in f2fs_acl_from_disk 2013-01-04 09:46:27 +09:00
acl.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
checkpoint.c f2fs: remove unneeded INIT_LIST_HEAD at few places 2013-01-04 09:42:59 +09:00
data.c f2fs: add missing #include <linux/prefetch.h> 2012-12-28 11:22:43 +09:00
debug.c f2fs: update f2fs partition info about SIT/NAT layout 2013-01-04 09:42:59 +09:00
dir.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
f2fs.h f2fs: revisit the f2fs_gc flow 2013-01-10 07:42:59 +09:00
file.c f2fs: add f2fs_balance_fs in several interfaces 2013-01-11 15:09:17 +09:00
gc.c f2fs: revisit the f2fs_gc flow 2013-01-10 07:42:59 +09:00
gc.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inode.c f2fs: add f2fs_balance_fs in several interfaces 2013-01-11 15:09:17 +09:00
Kconfig f2fs: resolve build failures 2012-12-11 13:43:43 +09:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
namei.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
node.c f2fs: clean up unused variables and return values 2012-12-28 11:27:52 +09:00
node.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
recovery.c f2fs: check return value during recovery 2013-01-04 09:46:27 +09:00
segment.c f2fs: revisit the f2fs_gc flow 2013-01-10 07:42:59 +09:00
segment.h f2fs: fix equation of has_not_enough_free_secs() 2012-12-28 11:24:10 +09:00
super.c f2fs: add f2fs_balance_fs in several interfaces 2013-01-11 15:09:17 +09:00
xattr.c f2fs: add f2fs_balance_fs in several interfaces 2013-01-11 15:09:17 +09:00
xattr.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00