diff options
author | Christoph Hellwig <hch@lst.de> | 2016-11-25 09:07:46 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-30 13:45:19 +0100 |
commit | 974b1adc3b103fae1dbc1fe6a8aceeca2878f20e (patch) | |
tree | 0b0aa4829383f26f184e6dc631ab36ae40a93554 /fs/btrfs/compression.h | |
parent | 0c476a5d7f63bdae0b6188a191a6e9eb8f1024d7 (diff) | |
download | linux-stable-974b1adc3b103fae1dbc1fe6a8aceeca2878f20e.tar.gz linux-stable-974b1adc3b103fae1dbc1fe6a8aceeca2878f20e.tar.bz2 linux-stable-974b1adc3b103fae1dbc1fe6a8aceeca2878f20e.zip |
btrfs: use bio iterators for the decompression handlers
Pass the full bio to the decompression routines and use bio iterators
to iterate over the data in the bio.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.h')
-rw-r--r-- | fs/btrfs/compression.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h index f49d8b8c0f00..09879579fbc8 100644 --- a/fs/btrfs/compression.h +++ b/fs/btrfs/compression.h @@ -34,9 +34,7 @@ int btrfs_decompress(int type, unsigned char *data_in, struct page *dest_page, unsigned long start_byte, size_t srclen, size_t destlen); int btrfs_decompress_buf2page(char *buf, unsigned long buf_start, unsigned long total_out, u64 disk_start, - struct bio_vec *bvec, int vcnt, - unsigned long *pg_index, - unsigned long *pg_offset); + struct bio *bio); int btrfs_submit_compressed_write(struct inode *inode, u64 start, unsigned long len, u64 disk_start, @@ -45,9 +43,6 @@ int btrfs_submit_compressed_write(struct inode *inode, u64 start, unsigned long nr_pages); int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, int mirror_num, unsigned long bio_flags); -void btrfs_clear_biovec_end(struct bio_vec *bvec, int vcnt, - unsigned long pg_index, - unsigned long pg_offset); enum btrfs_compression_type { BTRFS_COMPRESS_NONE = 0, @@ -72,11 +67,10 @@ struct btrfs_compress_op { unsigned long *total_out, unsigned long max_out); - int (*decompress_biovec)(struct list_head *workspace, + int (*decompress_bio)(struct list_head *workspace, struct page **pages_in, u64 disk_start, - struct bio_vec *bvec, - int vcnt, + struct bio *orig_bio, size_t srclen); int (*decompress)(struct list_head *workspace, |