]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: extent cache: support unaligned extent
authorChao Yu <chao@kernel.org>
Wed, 4 Aug 2021 02:23:48 +0000 (10:23 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 5 Aug 2021 18:26:11 +0000 (11:26 -0700)
commitb6762194eac95ce2d673b9a445d71e03ccdf1a93
tree170d60e5f46091e129b086135633174803f75c63
parent7e9fef6f3a3966ad5c83f3d6828a302bf9a1633a
f2fs: extent cache: support unaligned extent

Compressed inode may suffer read performance issue due to it can not
use extent cache, so I propose to add this unaligned extent support
to improve it.

Currently, it only works in readonly format f2fs image.

Unaligned extent: in one compressed cluster, physical block number
will be less than logical block number, so we add an extra physical
block length in extent info in order to indicate such extent status.

The idea is if one whole cluster blocks are contiguous physically,
once its mapping info was readed at first time, we will cache an
unaligned (or aligned) extent info entry in extent cache, it expects
that the mapping info will be hitted when rereading cluster.

Merge policy:
- Aligned extents can be merged.
- Aligned extent and unaligned extent can not be merged.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/compress.c
fs/f2fs/data.c
fs/f2fs/extent_cache.c
fs/f2fs/f2fs.h
fs/f2fs/node.c