summaryrefslogtreecommitdiff
path: root/fs/btrfs/btrfs_inode.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2024-05-03 06:19:57 +0300
committerDavid Sterba <dsterba@suse.com>2024-07-11 16:33:21 +0300
commite9ea31fb5c1f90a006dccb6972664086447f4911 (patch)
tree74fc012bbde9bb7114aa79401f5965e7cc6bf851 /fs/btrfs/btrfs_inode.h
parentcdc627e65c7eb8d105f0b9e9695106e54eea1a6e (diff)
downloadlinux-e9ea31fb5c1f90a006dccb6972664086447f4911.tar.xz
btrfs: cleanup duplicated parameters related to btrfs_alloc_ordered_extent
All parameters after @filepos of btrfs_alloc_ordered_extent() can be replaced with btrfs_file_extent structure. This patch does the cleanup, meanwhile some points to note: - Move btrfs_file_extent structure to ordered-data.h The structure is needed by both btrfs_alloc_ordered_extent() and can_nocow_extent(), but since btrfs_inode.h includes ordered-data.h, so we need to move the structure to ordered-data.h. - Move the special handling of NOCOW/PREALLOC into btrfs_alloc_ordered_extent() This is to allow btrfs_split_ordered_extent() to properly split them for DIO. For now just move the handling into btrfs_alloc_ordered_extent() to simplify the callers. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> 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/btrfs_inode.h')
-rw-r--r--fs/btrfs/btrfs_inode.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index be2f66f29b0c..db193b3be8eb 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -514,19 +514,6 @@ int btrfs_check_sector_csum(struct btrfs_fs_info *fs_info, struct page *page,
u32 pgoff, u8 *csum, const u8 * const csum_expected);
bool btrfs_data_csum_ok(struct btrfs_bio *bbio, struct btrfs_device *dev,
u32 bio_offset, struct bio_vec *bv);
-
-/*
- * This represents details about the target file extent item of a write operation.
- */
-struct btrfs_file_extent {
- u64 disk_bytenr;
- u64 disk_num_bytes;
- u64 num_bytes;
- u64 ram_bytes;
- u64 offset;
- u8 compression;
-};
-
noinline int can_nocow_extent(struct inode *inode, u64 offset, u64 *len,
struct btrfs_file_extent *file_extent,
bool nowait, bool strict);