mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 13:34:30 +00:00
btrfs: pass btrfs_inode to btrfs_submit_data_write_bio
The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
644094fd28
commit
535a7e5d6b
@ -411,7 +411,7 @@ static inline void btrfs_inode_split_flags(u64 inode_item_flags,
|
||||
#define CSUM_FMT "0x%*phN"
|
||||
#define CSUM_FMT_VALUE(size, bytes) size, bytes
|
||||
|
||||
void btrfs_submit_data_write_bio(struct inode *inode, struct bio *bio, int mirror_num);
|
||||
void btrfs_submit_data_write_bio(struct btrfs_inode *inode, struct bio *bio, int mirror_num);
|
||||
void btrfs_submit_data_read_bio(struct inode *inode, struct bio *bio,
|
||||
int mirror_num, enum btrfs_compression_type compress_type);
|
||||
void btrfs_submit_dio_repair_bio(struct inode *inode, struct bio *bio, int mirror_num);
|
||||
|
@ -136,7 +136,7 @@ static void submit_one_bio(struct btrfs_bio_ctrl *bio_ctrl)
|
||||
if (!is_data_inode(inode))
|
||||
btrfs_submit_metadata_bio(BTRFS_I(inode), bio, mirror_num);
|
||||
else if (btrfs_op(bio) == BTRFS_MAP_WRITE)
|
||||
btrfs_submit_data_write_bio(inode, bio, mirror_num);
|
||||
btrfs_submit_data_write_bio(BTRFS_I(inode), bio, mirror_num);
|
||||
else
|
||||
btrfs_submit_data_read_bio(inode, bio, mirror_num,
|
||||
bio_ctrl->compress_type);
|
||||
|
@ -2730,14 +2730,13 @@ out:
|
||||
return errno_to_blk_status(ret);
|
||||
}
|
||||
|
||||
void btrfs_submit_data_write_bio(struct inode *inode, struct bio *bio, int mirror_num)
|
||||
void btrfs_submit_data_write_bio(struct btrfs_inode *inode, struct bio *bio, int mirror_num)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
||||
struct btrfs_inode *bi = BTRFS_I(inode);
|
||||
struct btrfs_fs_info *fs_info = inode->root->fs_info;
|
||||
blk_status_t ret;
|
||||
|
||||
if (bio_op(bio) == REQ_OP_ZONE_APPEND) {
|
||||
ret = extract_ordered_extent(bi, bio,
|
||||
ret = extract_ordered_extent(inode, bio,
|
||||
page_offset(bio_first_bvec_all(bio)->bv_page));
|
||||
if (ret) {
|
||||
btrfs_bio_end_io(btrfs_bio(bio), ret);
|
||||
@ -2753,14 +2752,14 @@ void btrfs_submit_data_write_bio(struct inode *inode, struct bio *bio, int mirro
|
||||
* Csum items for reloc roots have already been cloned at this point,
|
||||
* so they are handled as part of the no-checksum case.
|
||||
*/
|
||||
if (!(bi->flags & BTRFS_INODE_NODATASUM) &&
|
||||
if (!(inode->flags & BTRFS_INODE_NODATASUM) &&
|
||||
!test_bit(BTRFS_FS_STATE_NO_CSUMS, &fs_info->fs_state) &&
|
||||
!btrfs_is_data_reloc_root(bi->root)) {
|
||||
if (!atomic_read(&bi->sync_writers) &&
|
||||
btrfs_wq_submit_bio(bi, bio, mirror_num, 0, WQ_SUBMIT_DATA))
|
||||
!btrfs_is_data_reloc_root(inode->root)) {
|
||||
if (!atomic_read(&inode->sync_writers) &&
|
||||
btrfs_wq_submit_bio(inode, bio, mirror_num, 0, WQ_SUBMIT_DATA))
|
||||
return;
|
||||
|
||||
ret = btrfs_csum_one_bio(bi, bio, (u64)-1, false);
|
||||
ret = btrfs_csum_one_bio(inode, bio, (u64)-1, false);
|
||||
if (ret) {
|
||||
btrfs_bio_end_io(btrfs_bio(bio), ret);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user