diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent-io-tree.h | 1 | ||||
-rw-r--r-- | fs/btrfs/extent_io.c | 17 | ||||
-rw-r--r-- | fs/btrfs/tests/extent-io-tests.c | 1 |
3 files changed, 2 insertions, 17 deletions
diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h index bcc8f6b05c03..a855f40dd61d 100644 --- a/fs/btrfs/extent-io-tree.h +++ b/fs/btrfs/extent-io-tree.h @@ -17,7 +17,6 @@ struct io_failure_record; #define EXTENT_NODATASUM (1U << 7) #define EXTENT_CLEAR_META_RESV (1U << 8) #define EXTENT_NEED_WAIT (1U << 9) -#define EXTENT_DAMAGED (1U << 10) #define EXTENT_NORESERVE (1U << 11) #define EXTENT_QGROUP_RESERVED (1U << 12) #define EXTENT_CLEAR_DATA_RESV (1U << 13) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index b503635e1e82..96546586785a 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -519,20 +519,14 @@ static struct io_failure_record *get_failrec(struct btrfs_inode *inode, u64 star return failrec; } -static int free_io_failure(struct btrfs_inode *inode, - struct io_failure_record *rec) +static void free_io_failure(struct btrfs_inode *inode, + struct io_failure_record *rec) { - int ret; - spin_lock(&inode->io_failure_lock); rb_erase(&rec->rb_node, &inode->io_failure_tree); spin_unlock(&inode->io_failure_lock); - ret = clear_extent_bits(&inode->io_tree, rec->bytenr, - rec->bytenr + rec->len - 1, - EXTENT_DAMAGED); kfree(rec); - return ret; } /* @@ -742,7 +736,6 @@ static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); u64 start = bbio->file_offset + bio_offset; struct io_failure_record *failrec; - struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; const u32 sectorsize = fs_info->sectorsize; int ret; @@ -796,12 +789,6 @@ static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode kfree(failrec); return ERR_PTR(ret); } - ret = set_extent_bits(tree, start, start + sectorsize - 1, - EXTENT_DAMAGED); - if (ret) { - free_io_failure(BTRFS_I(inode), failrec); - return ERR_PTR(ret); - } return failrec; } diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c index 4c824b7f07dd..f69ec4d2d6eb 100644 --- a/fs/btrfs/tests/extent-io-tests.c +++ b/fs/btrfs/tests/extent-io-tests.c @@ -80,7 +80,6 @@ static void extent_flag_to_str(const struct extent_state *state, char *dest) PRINT_ONE_FLAG(state, dest, cur, NODATASUM); PRINT_ONE_FLAG(state, dest, cur, CLEAR_META_RESV); PRINT_ONE_FLAG(state, dest, cur, NEED_WAIT); - PRINT_ONE_FLAG(state, dest, cur, DAMAGED); PRINT_ONE_FLAG(state, dest, cur, NORESERVE); PRINT_ONE_FLAG(state, dest, cur, QGROUP_RESERVED); PRINT_ONE_FLAG(state, dest, cur, CLEAR_DATA_RESV); |