f2fs: support IO alignment for DATA and NODE writes
authorJaegeuk Kim <jaegeuk@kernel.org>
Wed, 14 Dec 2016 18:12:56 +0000 (10:12 -0800)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 3 Oct 2017 13:45:50 +0000 (13:45 +0000)
commitb3fcb70064065bd1aa2083d98a5ec711d099a1ee
treebf6ce1c05c8d4257aa03c167485ff8ae154128fa
parent8ef4f0ca7b4d0cefe0f0b42af6106e6510f39ae6
f2fs: support IO alignment for DATA and NODE writes

commit 0a595ebaaa6b53a2226d3fee2a2fd616ea5ba378 upstream.

This patch implements IO alignment by filling dummy blocks in DATA and NODE
write bios. If we can guarantee, for example, 32KB or 64KB for such the IOs,
we can eliminate underlying dummy page problem which FTL conducts in order to
close MLC or TLC partial written pages.

Note that,
 - it requires "-o mode=lfs".
 - IO size should be power of 2, not exceed BIO_MAX_PAGES, 256.
 - read IO is still 4KB.
 - do checkpoint at fsync, if dummy NODE page was written.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/segment.c
fs/f2fs/segment.h
fs/f2fs/super.c
include/linux/f2fs_fs.h