diff options
| author | Christoph Hellwig <hch@lst.de> | 2023-01-21 07:50:04 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2023-02-15 19:38:51 +0100 |
| commit | 7276aa7d38255b40e578267c3634ebc05f5d5236 (patch) | |
| tree | 05805675b1b445b3f2f2c6fb2df71c7beb7189db /fs/btrfs/inode.c | |
| parent | 9ba0004bd95e059983b4ca8defad82ab41627e51 (diff) | |
| download | linux-7276aa7d38255b40e578267c3634ebc05f5d5236.tar.gz linux-7276aa7d38255b40e578267c3634ebc05f5d5236.tar.bz2 linux-7276aa7d38255b40e578267c3634ebc05f5d5236.zip | |
btrfs: save the bio iter for checksum validation in common code
All callers of btrfs_submit_bio that want to validate checksums
currently have to store a copy of the iter in the btrfs_bio. Move
the assignment into common code.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
| -rw-r--r-- | fs/btrfs/inode.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7c8f5349ed7a..c368a45bc079 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2773,9 +2773,6 @@ void btrfs_submit_data_read_bio(struct btrfs_inode *inode, struct bio *bio, return; } - /* Save the original iter for read repair */ - btrfs_bio(bio)->iter = bio->bi_iter; - /* * Lookup bio sums does extra checks around whether we need to csum or * not, which is why we ignore skip_sum here. @@ -7988,10 +7985,6 @@ static void btrfs_submit_dio_bio(struct bio *bio, struct btrfs_inode *inode, struct btrfs_fs_info *fs_info = inode->root->fs_info; blk_status_t ret; - /* Save the original iter for read repair */ - if (btrfs_op(bio) == BTRFS_MAP_READ) - btrfs_bio(bio)->iter = bio->bi_iter; - if (inode->flags & BTRFS_INODE_NODATASUM) goto map; |
