summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/relocation.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2023-09-22 13:07:29 +0200
committerDavid Sterba <dsterba@suse.com>2023-10-12 16:44:13 +0200
commitab7c8bbf3a088730e58da224bcad512f1dd9ca74 (patch)
treed43b2e65bf43ce8fac408c92936629da1e550364 /fs/btrfs/relocation.h
parentbtrfs: relocation: return bool from btrfs_should_ignore_reloc_root (diff)
downloadlinux-ab7c8bbf3a088730e58da224bcad512f1dd9ca74.tar.xz
linux-ab7c8bbf3a088730e58da224bcad512f1dd9ca74.zip
btrfs: relocation: constify parameters where possible
Lots of the functions in relocation.c don't change pointer parameters but lack the annotations. Add them and reformat according to current coding style if needed. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.h')
-rw-r--r--fs/btrfs/relocation.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/relocation.h b/fs/btrfs/relocation.h
index af749c780b4e..5fb60f2deb53 100644
--- a/fs/btrfs/relocation.h
+++ b/fs/btrfs/relocation.h
@@ -10,15 +10,16 @@ int btrfs_update_reloc_root(struct btrfs_trans_handle *trans,
int btrfs_recover_relocation(struct btrfs_fs_info *fs_info);
int btrfs_reloc_clone_csums(struct btrfs_ordered_extent *ordered);
int btrfs_reloc_cow_block(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, struct extent_buffer *buf,
+ struct btrfs_root *root,
+ const struct extent_buffer *buf,
struct extent_buffer *cow);
void btrfs_reloc_pre_snapshot(struct btrfs_pending_snapshot *pending,
u64 *bytes_to_reserve);
int btrfs_reloc_post_snapshot(struct btrfs_trans_handle *trans,
struct btrfs_pending_snapshot *pending);
-int btrfs_should_cancel_balance(struct btrfs_fs_info *fs_info);
+int btrfs_should_cancel_balance(const struct btrfs_fs_info *fs_info);
struct btrfs_root *find_reloc_root(struct btrfs_fs_info *fs_info, u64 bytenr);
-bool btrfs_should_ignore_reloc_root(struct btrfs_root *root);
-u64 btrfs_get_reloc_bg_bytenr(struct btrfs_fs_info *fs_info);
+bool btrfs_should_ignore_reloc_root(const struct btrfs_root *root);
+u64 btrfs_get_reloc_bg_bytenr(const struct btrfs_fs_info *fs_info);
#endif