diff options
author | Gao Xiang <hsiangkao@redhat.com> | 2021-04-07 07:39:26 +0300 |
---|---|---|
committer | Gao Xiang <hsiangkao@redhat.com> | 2021-04-09 22:20:19 +0300 |
commit | 598162d050801e556750defff4ddab499e5d76ed (patch) | |
tree | 60ba72dc02fbae69c6407bcb983c54fb7722855c /fs/erofs/erofs_fs.h | |
parent | b86269f43892316ef5a177d7180d09d101a46f22 (diff) | |
download | linux-598162d050801e556750defff4ddab499e5d76ed.tar.xz |
erofs: support decompress big pcluster for lz4 backend
Prior to big pcluster, there was only one compressed page so it'd
easy to map this. However, when big pcluster is enabled, more work
needs to be done to handle multiple compressed pages. In detail,
- (maptype 0) if there is only one compressed page + no need
to copy inplace I/O, just map it directly what we did before;
- (maptype 1) if there are more compressed pages + no need to
copy inplace I/O, vmap such compressed pages instead;
- (maptype 2) if inplace I/O needs to be copied, use per-CPU
buffers for decompression then.
Another thing is how to detect inplace decompression is feasable or
not (it's still quite easy for non big pclusters), apart from the
inplace margin calculation, inplace I/O page reusing order is also
needed to be considered for each compressed page. Currently, if the
compressed page is the xth page, it shouldn't be reused as [0 ...
nrpages_out - nrpages_in + x], otherwise a full copy will be triggered.
Although there are some extra optimization ideas for this, I'd like
to make big pcluster work correctly first and obviously it can be
further optimized later since it has nothing with the on-disk format
at all.
Link: https://lore.kernel.org/r/20210407043927.10623-10-xiang@kernel.org
Acked-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Diffstat (limited to 'fs/erofs/erofs_fs.h')
0 files changed, 0 insertions, 0 deletions