diff options
| author | Daniel Vacek <[email protected]> | 2025-03-06 13:15:35 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2025-03-18 19:35:50 +0000 |
| commit | fc5c0c5825874859069ac44c367c724acd7190fb (patch) | |
| tree | 3b3e5fb0a15f714baa7ff7a786c56ee2d3861be1 /fs/btrfs/compression.h | |
| parent | btrfs: send: simplify return logic from send_encoded_extent() (diff) | |
| download | kernel-fc5c0c5825874859069ac44c367c724acd7190fb.tar.gz kernel-fc5c0c5825874859069ac44c367c724acd7190fb.zip | |
btrfs: defrag: extend ioctl to accept compression levels
The zstd and zlib compression types support setting compression levels.
Enhance the defrag interface to specify the levels as well. For zstd the
negative (realtime) levels are also accepted.
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: Daniel Vacek <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/compression.h')
| -rw-r--r-- | fs/btrfs/compression.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h index 933178f03d8f..df198623cc08 100644 --- a/fs/btrfs/compression.h +++ b/fs/btrfs/compression.h @@ -83,6 +83,7 @@ static inline u32 btrfs_calc_input_length(u64 range_end, u64 cur) int __init btrfs_init_compress(void); void __cold btrfs_exit_compress(void); +bool btrfs_compress_level_valid(unsigned int type, int level); int btrfs_compress_folios(unsigned int type, int level, struct address_space *mapping, u64 start, struct folio **folios, unsigned long *out_folios, unsigned long *total_in, unsigned long *total_out); |
