]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/f2fs/f2fs.h
f2fs: introduce a new direct_IO write path
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Mon, 16 Dec 2013 10:04:05 +0000 (19:04 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Mon, 23 Dec 2013 01:18:07 +0000 (10:18 +0900)
commitbfad7c2d40332be6a1d7a89660bceb0f6ea1d73a
tree893b2d6ab84cdc2a7ae3b1381cf7c394711a0cce
parent216fbd64437452d23db54ae845916facd7215caa
f2fs: introduce a new direct_IO write path

Previously, f2fs doesn't support direct IOs with high performance, which throws
every write requests via the buffered write path, resulting in highly
performance degradation due to memory opeations like copy_from_user.

This patch introduces a new direct IO path in which every write requests are
processed by generic blockdev_direct_IO() with enhanced get_block function.

The get_data_block() in f2fs handles:
1. if original data blocks are allocates, then give them to blockdev.
2. otherwise,
  a. preallocate requested block addresses
  b. do not use extent cache for better performance
  c. give the block addresses to blockdev

This policy induces that:
- new allocated data are sequentially written to the disk
- updated data are randomly written to the disk.
- f2fs gives consistency on its file meta, not file data.

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