Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: [email protected] # 4.4+ Signed-off-by: David Sterba <[email protected]>
- Loading branch information