mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
btrfs: unexport btrfs_compress_set_level()
btrfs_compress_set_level() can be static function in the file compression.c. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
0202e83fda
commit
adbab6420c
@ -1139,6 +1139,22 @@ static void put_workspace(int type, struct list_head *ws)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Adjust @level according to the limits of the compression algorithm or
|
||||
* fallback to default
|
||||
*/
|
||||
static unsigned int btrfs_compress_set_level(int type, unsigned level)
|
||||
{
|
||||
const struct btrfs_compress_op *ops = btrfs_compress_op[type];
|
||||
|
||||
if (level == 0)
|
||||
level = ops->default_level;
|
||||
else
|
||||
level = min(level, ops->max_level);
|
||||
|
||||
return level;
|
||||
}
|
||||
|
||||
/*
|
||||
* Given an address space and start and length, compress the bytes into @pages
|
||||
* that are allocated on demand.
|
||||
@ -1746,19 +1762,3 @@ unsigned int btrfs_compress_str2level(unsigned int type, const char *str)
|
||||
|
||||
return level;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adjust @level according to the limits of the compression algorithm or
|
||||
* fallback to default
|
||||
*/
|
||||
unsigned int btrfs_compress_set_level(int type, unsigned level)
|
||||
{
|
||||
const struct btrfs_compress_op *ops = btrfs_compress_op[type];
|
||||
|
||||
if (level == 0)
|
||||
level = ops->default_level;
|
||||
else
|
||||
level = min(level, ops->max_level);
|
||||
|
||||
return level;
|
||||
}
|
||||
|
@ -140,8 +140,6 @@ extern const struct btrfs_compress_op btrfs_zstd_compress;
|
||||
const char* btrfs_compress_type2str(enum btrfs_compression_type type);
|
||||
bool btrfs_compress_is_valid_type(const char *str, size_t len);
|
||||
|
||||
unsigned int btrfs_compress_set_level(int type, unsigned level);
|
||||
|
||||
int btrfs_compress_heuristic(struct inode *inode, u64 start, u64 end);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user