btrfs-progs: extent-tree: Unify the parameters of btrfs_inc_extent_ref()
PATCH 1/1 btrfs-progs: extent-tree: Unify the parameters of btrfs_inc_extent_ref()
The old parameters, @ref_generation and @owner_objectid, are pretty confusing when using auto-completion.
Unify the parameters as a quick fix.
--- ctree.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
ctree.h +3 -4
@@ -2537,10 +2537,9 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, u64 root_objectid, u64 owner, u64 offset);void btrfs_finish_extent_commit (struct btrfs_trans_handle *trans);int btrfs_inc_extent_ref (struct btrfs_trans_handle *trans, -struct btrfs_root *root, -u64 bytenr,u64 num_bytes,u64 parent, -u64 root_objectid,u64 ref_generation, -u64 owner_objectid); +struct btrfs_root *root, +u64 bytenr,u64 num_bytes,u64 parent, +u64 root_objectid,u64 owner,u64 offset); int btrfs_update_extent_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 orig_parent, u64 parent,
Signature · 1 line
2.22.0
David Sterba
AppliedQuoted 6 lines · Qu Wenruo
The old parameters, @ref_generation and @owner_objectid, are pretty confusing when using auto-completion.
Unify the parameters as a quick fix.
Signed-off-by Qu Wenruo <[email protected]>
Applied, thanks.
Quoted 6 lines · Qu Wenruo
The old parameters, @ref_generation and @owner_objectid, are pretty confusing when using auto-completion.
Unify the parameters as a quick fix.
Signed-off-by Qu Wenruo <[email protected]>
Makes sense and looks good.
Just to remind, did you notice the next function named btrfs_update_extent_ref() whose parameters contains @ref_generation and @owner_objectid? This definition was forgotten to be removed in almost 10 years since commit 95d3f20b51e ("Mixed back reference (FORWARD ROLLING FORMAT CHANGE)").
This is another business though.
---
Su
Quoted 13 lines
--- ctree.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)ctree.h +0
-0@@ -2537,10 +2537,9 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, u64 root_objectid, u64 owner, u64 offset);void btrfs_finish_extent_commit (struct btrfs_trans_handle *trans); int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
ctree.h int btrfs_free_extent(struct btrfs_trans_handle *trans, · line 2545
Quoted 10 lines
ctree.h +3
-4-struct btrfs_root *root, - u64 bytenr, u64 num_bytes, u64 parent, - u64 root_objectid, u64 ref_generation, - u64 owner_objectid); +struct btrfs_root *root, + u64 bytenr, u64 num_bytes, u64 parent, + u64 root_objectid, u64 owner, u64 offset); int btrfs_update_extent_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 orig_parent, u64 parent,
--
Su
"Obey or die!"