diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2010-11-08 02:22:19 -0500 |
---|---|---|
committer | Li Zefan <lizf@cn.fujitsu.com> | 2010-12-22 10:15:50 -0500 |
commit | 3a39c18d63fec35f49df577d4b2a4e29c2212f22 (patch) | |
tree | 78b8c032e18e2231c18e89ac3f8f5746abdb119c /fs/btrfs/compression.h | |
parent | 1a419d85a76853d7d04e9b6280a80e96770bf3e3 (diff) |
btrfs: Extract duplicate decompress code
Add a common function to copy decompressed data from working buffer
to bio pages.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Diffstat (limited to 'fs/btrfs/compression.h')
-rw-r--r-- | fs/btrfs/compression.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h index f7ce217113fa..51000174b9d7 100644 --- a/fs/btrfs/compression.h +++ b/fs/btrfs/compression.h | |||
@@ -34,6 +34,11 @@ int btrfs_decompress_biovec(int type, struct page **pages_in, u64 disk_start, | |||
34 | struct bio_vec *bvec, int vcnt, size_t srclen); | 34 | struct bio_vec *bvec, int vcnt, size_t srclen); |
35 | int btrfs_decompress(int type, unsigned char *data_in, struct page *dest_page, | 35 | int btrfs_decompress(int type, unsigned char *data_in, struct page *dest_page, |
36 | unsigned long start_byte, size_t srclen, size_t destlen); | 36 | unsigned long start_byte, size_t srclen, size_t destlen); |
37 | int btrfs_decompress_buf2page(char *buf, unsigned long buf_start, | ||
38 | unsigned long total_out, u64 disk_start, | ||
39 | struct bio_vec *bvec, int vcnt, | ||
40 | unsigned long *page_index, | ||
41 | unsigned long *pg_offset); | ||
37 | 42 | ||
38 | int btrfs_submit_compressed_write(struct inode *inode, u64 start, | 43 | int btrfs_submit_compressed_write(struct inode *inode, u64 start, |
39 | unsigned long len, u64 disk_start, | 44 | unsigned long len, u64 disk_start, |