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/inode.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/inode.c')
| -rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3c49742f0d45..0a85e42f114c 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8097,7 +8097,8 @@ static void btrfs_submit_direct(const struct iomap_iter *iter, * the allocation is backed by btrfs_bioset. */ bio = btrfs_bio_clone_partial(dio_bio, clone_offset, clone_len, - btrfs_end_dio_bio, dip); + BTRFS_I(inode), btrfs_end_dio_bio, + dip); btrfs_bio(bio)->file_offset = file_offset; if (bio_op(bio) == REQ_OP_ZONE_APPEND) { @@ -10409,6 +10410,7 @@ int btrfs_encoded_read_regular_fill_pages(struct btrfs_inode *inode, if (!bio) { bio = btrfs_bio_alloc(BIO_MAX_VECS, REQ_OP_READ, + inode, btrfs_encoded_read_endio, &priv); bio->bi_iter.bi_sector = |
