• Chao Yu's avatar
    f2fs: compress: remove unneeded preallocation · 8f1d4983
    Chao Yu authored
    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: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    8f1d4983
compress.c 40.2 KB