]> www.infradead.org Git - users/jedix/linux-maple.git/commit
f2fs: compress: remove unneeded preallocation
authorChao Yu <yuchao0@huawei.com>
Wed, 12 May 2021 09:52:58 +0000 (17:52 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 26 May 2021 14:00:37 +0000 (07:00 -0700)
commit39c036a98d52c88eba83ef3ca5bb854a39bcf441
tree07928af8df6b86053bb6d0210ffb3f22bb1424b0
parentb585a90e9fe22457fe93b2314c18cbf8aa93d8eb
f2fs: compress: remove unneeded preallocation

We will reserve iblocks for compression saved, so during compressed
cluster overwrite, we don't need to preallocate blocks for later
write.

In addition, it adds a bug_on to detect wrong reserved iblock number
in __f2fs_cluster_blocks().

Bug fix in the original patch by Jaegeuk:
If we released compressed blocks having an immutable bit, we can see less
number of compressed block addresses. Let's fix wrong BUG_ON.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/compress.c
fs/f2fs/file.c