]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: rename io_failure_record::bio_flags to compress_type
authorDavid Sterba <dsterba@suse.com>
Tue, 27 Jul 2021 12:53:55 +0000 (14:53 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:17:31 +0000 (17:17 +0200)
The bio_flags is now used to store unchanged compress type, so unify
that.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h

index 6c40eed217d62b72902c1536291e51688c5d64f0..faa41ca23bbb6d817586c1993a1275078b02650d 100644 (file)
@@ -2538,7 +2538,7 @@ static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode
        failrec->start = start;
        failrec->len = sectorsize;
        failrec->this_mirror = 0;
-       failrec->bio_flags = 0;
+       failrec->compress_type = BTRFS_COMPRESS_NONE;
 
        read_lock(&em_tree->lock);
        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
        logical = em->block_start + logical;
        if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) {
                logical = em->block_start;
-               failrec->bio_flags = em->compress_type;
+               failrec->compress_type = em->compress_type;
        }
 
        btrfs_debug(fs_info,
@@ -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
         * 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;
 }
 
index fdbfe801dbe2ae759399eaf87b5c2eebe969209f..7774a48053fdfce127ba960a619ca0cebef6259d 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/refcount.h>
 #include <linux/fiemap.h>
 #include <linux/btrfs_tree.h>
+#include "compression.h"
 #include "ulist.h"
 
 enum {
@@ -266,7 +267,7 @@ struct io_failure_record {
        u64 start;
        u64 len;
        u64 logical;
-       unsigned long bio_flags;
+       enum btrfs_compression_type compress_type;
        int this_mirror;
        int failed_mirror;
 };