mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-08 15:33:47 +00:00
btrfs: Change submit_bio_hook to taking an inode directly
The only possible 'private_data' that is passed to this function is actually an inode. Make that explicit by changing the signature of the call back. No functional changes. Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
a9355a0ef3
commit
a56b1c7bc8
3 changed files with 4 additions and 6 deletions
|
@ -885,11 +885,10 @@ static int check_async_write(struct btrfs_inode *bi)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static blk_status_t btree_submit_bio_hook(void *private_data, struct bio *bio,
|
static blk_status_t btree_submit_bio_hook(struct inode *inode, struct bio *bio,
|
||||||
int mirror_num, unsigned long bio_flags,
|
int mirror_num, unsigned long bio_flags,
|
||||||
u64 bio_offset)
|
u64 bio_offset)
|
||||||
{
|
{
|
||||||
struct inode *inode = private_data;
|
|
||||||
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
||||||
int async = check_async_write(BTRFS_I(inode));
|
int async = check_async_write(BTRFS_I(inode));
|
||||||
blk_status_t ret;
|
blk_status_t ret;
|
||||||
|
@ -915,7 +914,7 @@ static blk_status_t btree_submit_bio_hook(void *private_data, struct bio *bio,
|
||||||
* checksumming can happen in parallel across all CPUs
|
* checksumming can happen in parallel across all CPUs
|
||||||
*/
|
*/
|
||||||
ret = btrfs_wq_submit_bio(fs_info, bio, mirror_num, 0,
|
ret = btrfs_wq_submit_bio(fs_info, bio, mirror_num, 0,
|
||||||
bio_offset, private_data,
|
bio_offset, inode,
|
||||||
btree_submit_bio_start);
|
btree_submit_bio_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ struct extent_io_ops {
|
||||||
* The following callbacks must be always defined, the function
|
* The following callbacks must be always defined, the function
|
||||||
* pointer will be called unconditionally.
|
* pointer will be called unconditionally.
|
||||||
*/
|
*/
|
||||||
blk_status_t (*submit_bio_hook)(void *private_data, struct bio *bio,
|
blk_status_t (*submit_bio_hook)(struct inode *inode, struct bio *bio,
|
||||||
int mirror_num, unsigned long bio_flags,
|
int mirror_num, unsigned long bio_flags,
|
||||||
u64 bio_offset);
|
u64 bio_offset);
|
||||||
int (*readpage_end_io_hook)(struct btrfs_io_bio *io_bio, u64 phy_offset,
|
int (*readpage_end_io_hook)(struct btrfs_io_bio *io_bio, u64 phy_offset,
|
||||||
|
|
|
@ -1953,11 +1953,10 @@ static blk_status_t btrfs_submit_bio_start(void *private_data, struct bio *bio,
|
||||||
*
|
*
|
||||||
* c-3) otherwise: async submit
|
* c-3) otherwise: async submit
|
||||||
*/
|
*/
|
||||||
static blk_status_t btrfs_submit_bio_hook(void *private_data, struct bio *bio,
|
static blk_status_t btrfs_submit_bio_hook(struct inode *inode, struct bio *bio,
|
||||||
int mirror_num, unsigned long bio_flags,
|
int mirror_num, unsigned long bio_flags,
|
||||||
u64 bio_offset)
|
u64 bio_offset)
|
||||||
{
|
{
|
||||||
struct inode *inode = private_data;
|
|
||||||
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
||||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||||
enum btrfs_wq_endio_type metadata = BTRFS_WQ_ENDIO_DATA;
|
enum btrfs_wq_endio_type metadata = BTRFS_WQ_ENDIO_DATA;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue