diff options
author | Anand Jain <anand.jain@oracle.com> | 2017-05-26 10:44:59 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-19 19:26:00 +0300 |
commit | e1ddce71d6cab53c28353c081af7692169417d1b (patch) | |
tree | 35c8c9bde02213d854999783175de221237b5133 /fs/btrfs/compression.c | |
parent | 8140dc30a432694d851c1b24b8eda95acd494e16 (diff) | |
download | linux-e1ddce71d6cab53c28353c081af7692169417d1b.tar.xz |
btrfs: reduce arguments for decompress_bio ops
struct compressed_bio pointer can be used instead.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index ce57fea2a66f..ba511dd454d5 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -42,45 +42,6 @@ #include "extent_io.h" #include "extent_map.h" -struct compressed_bio { - /* number of bios pending for this compressed extent */ - refcount_t pending_bios; - - /* the pages with the compressed data on them */ - struct page **compressed_pages; - - /* inode that owns this data */ - struct inode *inode; - - /* starting offset in the inode for our pages */ - u64 start; - - /* number of bytes in the inode we're working on */ - unsigned long len; - - /* number of bytes on disk */ - unsigned long compressed_len; - - /* the compression algorithm for this bio */ - int compress_type; - - /* number of compressed pages in the array */ - unsigned long nr_pages; - - /* IO errors */ - int errors; - int mirror_num; - - /* for reads, this is the bio we are copying the data into */ - struct bio *orig_bio; - - /* - * the start of a variable length array of checksums only - * used by reads - */ - u32 sums; -}; - static int btrfs_decompress_bio(struct compressed_bio *cb); static inline int compressed_bio_size(struct btrfs_fs_info *fs_info, @@ -963,12 +924,9 @@ static int btrfs_decompress_bio(struct compressed_bio *cb) int type = cb->compress_type; workspace = find_workspace(type); - - ret = btrfs_compress_op[type - 1]->decompress_bio(workspace, - cb->compressed_pages, cb->start, cb->orig_bio, - cb->compressed_len); - + ret = btrfs_compress_op[type - 1]->decompress_bio(workspace, cb); free_workspace(type, workspace); + return ret; } |