summaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2021-06-14 13:45:18 +0300
committerDavid Sterba <dsterba@suse.com>2021-06-22 15:11:57 +0300
commitf2165627319ffd33a6217275e5690b1ab5c45763 (patch)
treee50aa6f191623b4a05bf4970425d80f7ae7ff19b /fs/btrfs/ctree.c
parent44365827cccc1441d4187509257e5276af133a49 (diff)
downloadlinux-f2165627319ffd33a6217275e5690b1ab5c45763.tar.xz
btrfs: compression: don't try to compress if we don't have enough pages
The early check if we should attempt compression does not take into account the number of input pages. It can happen that there's only one page, eg. a tail page after some ranges of the BTRFS_MAX_UNCOMPRESSED have been processed, or an isolated page that won't be converted to an inline extent. The single page would be compressed but a later check would drop it again because the result size must be at least one block shorter than the input. That can never work with just one page. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
0 files changed, 0 insertions, 0 deletions