提交 0ff40013 编写于 作者: D David Sterba

btrfs: rename io_failure_record::bio_flags to compress_type

The bio_flags is now used to store unchanged compress type, so unify
that.
Reviewed-by: NJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: NNikolay Borisov <nborisov@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 7f6ca7f2
...@@ -2538,7 +2538,7 @@ static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode ...@@ -2538,7 +2538,7 @@ static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode
failrec->start = start; failrec->start = start;
failrec->len = sectorsize; failrec->len = sectorsize;
failrec->this_mirror = 0; failrec->this_mirror = 0;
failrec->bio_flags = 0; failrec->compress_type = BTRFS_COMPRESS_NONE;
read_lock(&em_tree->lock); read_lock(&em_tree->lock);
em = lookup_extent_mapping(em_tree, start, failrec->len); em = lookup_extent_mapping(em_tree, start, failrec->len);
...@@ -2562,7 +2562,7 @@ static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode ...@@ -2562,7 +2562,7 @@ static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode
logical = em->block_start + logical; logical = em->block_start + logical;
if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) { if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) {
logical = em->block_start; logical = em->block_start;
failrec->bio_flags = em->compress_type; failrec->compress_type = em->compress_type;
} }
btrfs_debug(fs_info, btrfs_debug(fs_info,
...@@ -2694,7 +2694,7 @@ int btrfs_repair_one_sector(struct inode *inode, ...@@ -2694,7 +2694,7 @@ int btrfs_repair_one_sector(struct inode *inode,
* will be handled by the endio on the repair_bio, so we can't return an * will be handled by the endio on the repair_bio, so we can't return an
* error here. * error here.
*/ */
submit_bio_hook(inode, repair_bio, failrec->this_mirror, failrec->bio_flags); submit_bio_hook(inode, repair_bio, failrec->this_mirror, failrec->compress_type);
return BLK_STS_OK; return BLK_STS_OK;
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/refcount.h> #include <linux/refcount.h>
#include <linux/fiemap.h> #include <linux/fiemap.h>
#include <linux/btrfs_tree.h> #include <linux/btrfs_tree.h>
#include "compression.h"
#include "ulist.h" #include "ulist.h"
enum { enum {
...@@ -266,7 +267,7 @@ struct io_failure_record { ...@@ -266,7 +267,7 @@ struct io_failure_record {
u64 start; u64 start;
u64 len; u64 len;
u64 logical; u64 logical;
unsigned long bio_flags; enum btrfs_compression_type compress_type;
int this_mirror; int this_mirror;
int failed_mirror; int failed_mirror;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册