summaryrefslogtreecommitdiff
path: root/fs/btrfs/bio.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-01-21 09:50:00 +0300
committerDavid Sterba <dsterba@suse.com>2023-02-15 21:38:50 +0300
commitd0e5cb2be7703172d98699275d722c4081241144 (patch)
tree261dd5702b2c5d9af0e65c9ae491ce882c9b6322 /fs/btrfs/bio.h
parente0cfbb2ccabbeaea9e6b3b203d83edca49c702b2 (diff)
downloadlinux-d0e5cb2be7703172d98699275d722c4081241144.tar.xz
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/bio.h')
-rw-r--r--fs/btrfs/bio.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/bio.h b/fs/btrfs/bio.h
index baaa27961cc8..8d69d0b226d9 100644
--- a/fs/btrfs/bio.h
+++ b/fs/btrfs/bio.h
@@ -41,7 +41,8 @@ struct btrfs_bio {
unsigned int is_metadata:1;
struct bvec_iter iter;
- /* File offset that this I/O operates on. */
+ /* Inode and offset into it that this I/O operates on. */
+ struct btrfs_inode *inode;
u64 file_offset;
/* @device is for stripe IO submission. */
@@ -80,8 +81,10 @@ int __init btrfs_bioset_init(void);
void __cold btrfs_bioset_exit(void);
struct bio *btrfs_bio_alloc(unsigned int nr_vecs, blk_opf_t opf,
+ struct btrfs_inode *inode,
btrfs_bio_end_io_t end_io, void *private);
struct bio *btrfs_bio_clone_partial(struct bio *orig, u64 offset, u64 size,
+ struct btrfs_inode *inode,
btrfs_bio_end_io_t end_io, void *private);