Skip to content

Commit 0ff4001

Browse files
committed
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: Johannes Thumshirn <[email protected]> Reviewed-by: Nikolay Borisov <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 7f6ca7f commit 0ff4001

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

fs/btrfs/extent_io.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2538,7 +2538,7 @@ static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode
25382538
failrec->start = start;
25392539
failrec->len = sectorsize;
25402540
failrec->this_mirror = 0;
2541-
failrec->bio_flags = 0;
2541+
failrec->compress_type = BTRFS_COMPRESS_NONE;
25422542

25432543
read_lock(&em_tree->lock);
25442544
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
25622562
logical = em->block_start + logical;
25632563
if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) {
25642564
logical = em->block_start;
2565-
failrec->bio_flags = em->compress_type;
2565+
failrec->compress_type = em->compress_type;
25662566
}
25672567

25682568
btrfs_debug(fs_info,
@@ -2694,7 +2694,7 @@ int btrfs_repair_one_sector(struct inode *inode,
26942694
* will be handled by the endio on the repair_bio, so we can't return an
26952695
* error here.
26962696
*/
2697-
submit_bio_hook(inode, repair_bio, failrec->this_mirror, failrec->bio_flags);
2697+
submit_bio_hook(inode, repair_bio, failrec->this_mirror, failrec->compress_type);
26982698
return BLK_STS_OK;
26992699
}
27002700

fs/btrfs/extent_io.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/refcount.h>
88
#include <linux/fiemap.h>
99
#include <linux/btrfs_tree.h>
10+
#include "compression.h"
1011
#include "ulist.h"
1112

1213
enum {
@@ -266,7 +267,7 @@ struct io_failure_record {
266267
u64 start;
267268
u64 len;
268269
u64 logical;
269-
unsigned long bio_flags;
270+
enum btrfs_compression_type compress_type;
270271
int this_mirror;
271272
int failed_mirror;
272273
};

0 commit comments

Comments
 (0)