btrfs: Allow to add new compression algorithm

Make the code aware of compression type, instead of always assuming
zlib compression.

Also make the zlib workspace function as common code for all
compression types.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
This commit is contained in:
Li Zefan
2010-12-17 14:21:50 +08:00
parent 4b72029dc3
commit 261507a02c
15 changed files with 474 additions and 283 deletions

View File

@ -157,7 +157,7 @@ struct btrfs_inode {
/*
* always compress this one file
*/
unsigned force_compress:1;
unsigned force_compress:4;
struct inode vfs_inode;
};