diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-06-03 08:55:13 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-07-27 13:55:31 +0300 |
commit | e7fbf60453a7eae2a36ac9096c84ccb1067dabdf (patch) | |
tree | bb6c48bf2c097215baae77b620578b00d1d3f0f5 | |
parent | a0349401c14f507990bbe052406498fd527f7df7 (diff) | |
download | linux-e7fbf60453a7eae2a36ac9096c84ccb1067dabdf.tar.xz |
btrfs: make btrfs_add_ordered_extent take btrfs_inode
Preparation to converting its callers to taking btrfs_inode.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/inode.c | 9 | ||||
-rw-r--r-- | fs/btrfs/ordered-data.c | 4 | ||||
-rw-r--r-- | fs/btrfs/ordered-data.h | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7a815f1d9e0d..2d053c33c380 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1081,8 +1081,9 @@ static noinline int cow_file_range(struct inode *inode, } free_extent_map(em); - ret = btrfs_add_ordered_extent(inode, start, ins.objectid, - ram_size, cur_alloc_size, 0); + ret = btrfs_add_ordered_extent(BTRFS_I(inode), start, + ins.objectid, ram_size, + cur_alloc_size, 0); if (ret) goto out_drop_extent_cache; @@ -1716,7 +1717,7 @@ out_check: goto error; } free_extent_map(em); - ret = btrfs_add_ordered_extent(inode, cur_offset, + ret = btrfs_add_ordered_extent(BTRFS_I(inode), cur_offset, disk_bytenr, num_bytes, num_bytes, BTRFS_ORDERED_PREALLOC); @@ -1728,7 +1729,7 @@ out_check: goto error; } } else { - ret = btrfs_add_ordered_extent(inode, cur_offset, + ret = btrfs_add_ordered_extent(BTRFS_I(inode), cur_offset, disk_bytenr, num_bytes, num_bytes, BTRFS_ORDERED_NOCOW); diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 5f9ba8280560..156063373cc1 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -252,11 +252,11 @@ static int __btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset return 0; } -int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset, +int btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset, u64 disk_bytenr, u64 num_bytes, u64 disk_num_bytes, int type) { - return __btrfs_add_ordered_extent(BTRFS_I(inode), file_offset, disk_bytenr, + return __btrfs_add_ordered_extent(inode, file_offset, disk_bytenr, num_bytes, disk_num_bytes, type, 0, BTRFS_COMPRESS_NONE); } diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h index f2a78f8f6bce..6c42f307b87f 100644 --- a/fs/btrfs/ordered-data.h +++ b/fs/btrfs/ordered-data.h @@ -151,7 +151,7 @@ int btrfs_dec_test_first_ordered_pending(struct inode *inode, struct btrfs_ordered_extent **cached, u64 *file_offset, u64 io_size, int uptodate); -int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset, +int btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset, u64 disk_bytenr, u64 num_bytes, u64 disk_num_bytes, int type); int btrfs_add_ordered_extent_dio(struct inode *inode, u64 file_offset, |