]> git.karo-electronics.de Git - karo-tx-linux.git/commit
f2fs: reclaim prefree segments periodically
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Thu, 24 Oct 2013 04:31:34 +0000 (13:31 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Fri, 25 Oct 2013 07:54:37 +0000 (16:54 +0900)
commit81eb8d6e2869b119d4a7b8c02091c3779733a3ac
treecdff776596fa79bfc9c2f2baf7aa59470dc29aec
parentaabe51364f44681cbd83fb1c27ef7d3dbe567c45
f2fs: reclaim prefree segments periodically

Previously, f2fs postpones reclaiming prefree segments into free segments
as much as possible.
However, if user writes and deletes a bunch of data without any sync or fsync
calls, some flash storages can suffer from garbage collections.

So, this patch adds the reclaiming codes to f2fs_write_node_pages and background
GC thread.

If there are a lot of prefree segments, let's do checkpoint so that f2fs
submits discard commands for the prefree regions to the flash storage.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/f2fs.h
fs/f2fs/gc.c
fs/f2fs/node.c
fs/f2fs/segment.c
fs/f2fs/segment.h