diff options
author | Qu Wenruo <wqu@suse.com> | 2020-12-02 14:47:57 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-12-09 19:16:09 +0100 |
commit | 1941b64b080b45a80796a9f3a2e5c89554e53bdf (patch) | |
tree | f5fe2f9b2e48067dc2f84ffcfc03d198defd2b16 /fs/btrfs/inode.c | |
parent | 8a6a87cd449b9840f8169e0ece0a8fa11232723d (diff) | |
download | lwn-1941b64b080b45a80796a9f3a2e5c89554e53bdf.tar.gz lwn-1941b64b080b45a80796a9f3a2e5c89554e53bdf.zip |
btrfs: rename bio_offset of extent_submit_bio_start_t to dio_file_offset
The parameter bio_offset of extent_submit_bio_start_t is very confusing.
If it's really bio_offset (offset to bio), then it should be u32. But
in fact, it's only utilized by dio read, and that member is used as file
offset, which must be u64.
Rename it to dio_file_offset since the only user uses it as file offset,
and add comment for who is using it.
Signed-off-by: Qu Wenruo <wqu@suse.com>
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0ce42d52d53e..4cd09a9d2029 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2212,7 +2212,7 @@ int btrfs_bio_fits_in_stripe(struct page *page, size_t size, struct bio *bio, * are inserted into the btree */ static blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio, - u64 bio_offset) + u64 dio_file_offset) { return btrfs_csum_one_bio(BTRFS_I(inode), bio, 0, 0); } @@ -7795,9 +7795,10 @@ static void __endio_write_update_ordered(struct btrfs_inode *inode, } static blk_status_t btrfs_submit_bio_start_direct_io(struct inode *inode, - struct bio *bio, u64 offset) + struct bio *bio, + u64 dio_file_offset) { - return btrfs_csum_one_bio(BTRFS_I(inode), bio, offset, 1); + return btrfs_csum_one_bio(BTRFS_I(inode), bio, dio_file_offset, 1); } static void btrfs_end_dio_bio(struct bio *bio) @@ -7846,8 +7847,7 @@ static inline blk_status_t btrfs_submit_dio_bio(struct bio *bio, goto map; if (write && async_submit) { - ret = btrfs_wq_submit_bio(inode, bio, 0, 0, - file_offset, + ret = btrfs_wq_submit_bio(inode, bio, 0, 0, file_offset, btrfs_submit_bio_start_direct_io); goto err; } else if (write) { |