diff options
| author | Christoph Hellwig <hch@lst.de> | 2023-01-21 07:50:00 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2023-02-15 19:38:50 +0100 |
| commit | d0e5cb2be7703172d98699275d722c4081241144 (patch) | |
| tree | 261dd5702b2c5d9af0e65c9ae491ce882c9b6322 /fs/btrfs/extent_io.c | |
| parent | e0cfbb2ccabbeaea9e6b3b203d83edca49c702b2 (diff) | |
| download | linux-d0e5cb2be7703172d98699275d722c4081241144.tar.gz linux-d0e5cb2be7703172d98699275d722c4081241144.tar.bz2 linux-d0e5cb2be7703172d98699275d722c4081241144.zip | |
btrfs: add a btrfs_inode pointer to struct btrfs_bio
All btrfs_bio I/Os are associated with an inode. Add a pointer to that
inode, which will allow to simplify a lot of calling conventions, and
which will be needed in the I/O completion path in the future.
This grow the btrfs_bio structure by a pointer, but that grows will
be offset by the removal of the device pointer soon.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
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/extent_io.c')
| -rw-r--r-- | fs/btrfs/extent_io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 3bbf8703db2a..a8e8567aa428 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -740,7 +740,8 @@ int btrfs_repair_one_sector(struct btrfs_inode *inode, struct btrfs_bio *failed_ return -EIO; } - repair_bio = btrfs_bio_alloc(1, REQ_OP_READ, failed_bbio->end_io, + repair_bio = btrfs_bio_alloc(1, REQ_OP_READ, failed_bbio->inode, + failed_bbio->end_io, failed_bbio->private); repair_bbio = btrfs_bio(repair_bio); repair_bbio->file_offset = start; @@ -1394,9 +1395,8 @@ static int alloc_new_bio(struct btrfs_inode *inode, struct bio *bio; int ret; - ASSERT(bio_ctrl->end_io_func); - - bio = btrfs_bio_alloc(BIO_MAX_VECS, opf, bio_ctrl->end_io_func, NULL); + bio = btrfs_bio_alloc(BIO_MAX_VECS, opf, inode, bio_ctrl->end_io_func, + NULL); /* * For compressed page range, its disk_bytenr is always @disk_bytenr * passed in, no matter if we have added any range into previous bio. |
