diff mbox series

[12/19] btrfs: rename btrfs_data_ref->ino to ->objectid

Message ID a9d11bba7cab6dcef20c578a9546361daad1ed5f.1713052088.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs: delayed refs cleanups | expand

Commit Message

Josef Bacik April 13, 2024, 11:53 p.m. UTC
This is how we refer to it in the rest of the extent reference related
code, make it consistent.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/delayed-ref.c | 4 ++--
 fs/btrfs/delayed-ref.h | 2 +-
 fs/btrfs/ref-verify.c  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Filipe Manana April 15, 2024, 12:57 p.m. UTC | #1
On Sun, Apr 14, 2024 at 12:54 AM Josef Bacik <josef@toxicpanda.com> wrote:
>
> This is how we refer to it in the rest of the extent reference related
> code, make it consistent.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

Reviewed-by: Filipe Manana <fdmanana@suse.com>

Looks good, thanks.

> ---
>  fs/btrfs/delayed-ref.c | 4 ++--
>  fs/btrfs/delayed-ref.h | 2 +-
>  fs/btrfs/ref-verify.c  | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
> index f9779142a174..397e1d0b4010 100644
> --- a/fs/btrfs/delayed-ref.c
> +++ b/fs/btrfs/delayed-ref.c
> @@ -983,7 +983,7 @@ static void init_delayed_ref_common(struct btrfs_fs_info *fs_info,
>         INIT_LIST_HEAD(&ref->add_list);
>
>         if (generic_ref->type == BTRFS_REF_DATA) {
> -               ref->data_ref.objectid = generic_ref->data_ref.ino;
> +               ref->data_ref.objectid = generic_ref->data_ref.objectid;
>                 ref->data_ref.offset = generic_ref->data_ref.offset;
>         } else {
>                 ref->tree_ref.level = generic_ref->tree_ref.level;
> @@ -1014,7 +1014,7 @@ void btrfs_init_data_ref(struct btrfs_ref *generic_ref, u64 ino, u64 offset,
>         /* If @real_root not set, use @root as fallback */
>         generic_ref->real_root = mod_root ?: generic_ref->ref_root;
>  #endif
> -       generic_ref->data_ref.ino = ino;
> +       generic_ref->data_ref.objectid = ino;
>         generic_ref->data_ref.offset = offset;
>         generic_ref->type = BTRFS_REF_DATA;
>         if (skip_qgroup || !(is_fstree(generic_ref->ref_root) &&
> diff --git a/fs/btrfs/delayed-ref.h b/fs/btrfs/delayed-ref.h
> index 6ad48e0a0a1a..3e7afac518ac 100644
> --- a/fs/btrfs/delayed-ref.h
> +++ b/fs/btrfs/delayed-ref.h
> @@ -226,7 +226,7 @@ struct btrfs_data_ref {
>         /* For EXTENT_DATA_REF */
>
>         /* Inode which refers to this data extent */
> -       u64 ino;
> +       u64 objectid;
>
>         /*
>          * file_offset - extent_offset
> diff --git a/fs/btrfs/ref-verify.c b/fs/btrfs/ref-verify.c
> index 94bbb7ef9a13..cf531255ab76 100644
> --- a/fs/btrfs/ref-verify.c
> +++ b/fs/btrfs/ref-verify.c
> @@ -688,7 +688,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
>                 owner = generic_ref->tree_ref.level;
>         } else if (!parent) {
>                 ref_root = generic_ref->ref_root;
> -               owner = generic_ref->data_ref.ino;
> +               owner = generic_ref->data_ref.objectid;
>                 offset = generic_ref->data_ref.offset;
>         }
>         metadata = owner < BTRFS_FIRST_FREE_OBJECTID;
> --
> 2.43.0
>
>
diff mbox series

Patch

diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index f9779142a174..397e1d0b4010 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -983,7 +983,7 @@  static void init_delayed_ref_common(struct btrfs_fs_info *fs_info,
 	INIT_LIST_HEAD(&ref->add_list);
 
 	if (generic_ref->type == BTRFS_REF_DATA) {
-		ref->data_ref.objectid = generic_ref->data_ref.ino;
+		ref->data_ref.objectid = generic_ref->data_ref.objectid;
 		ref->data_ref.offset = generic_ref->data_ref.offset;
 	} else {
 		ref->tree_ref.level = generic_ref->tree_ref.level;
@@ -1014,7 +1014,7 @@  void btrfs_init_data_ref(struct btrfs_ref *generic_ref, u64 ino, u64 offset,
 	/* If @real_root not set, use @root as fallback */
 	generic_ref->real_root = mod_root ?: generic_ref->ref_root;
 #endif
-	generic_ref->data_ref.ino = ino;
+	generic_ref->data_ref.objectid = ino;
 	generic_ref->data_ref.offset = offset;
 	generic_ref->type = BTRFS_REF_DATA;
 	if (skip_qgroup || !(is_fstree(generic_ref->ref_root) &&
diff --git a/fs/btrfs/delayed-ref.h b/fs/btrfs/delayed-ref.h
index 6ad48e0a0a1a..3e7afac518ac 100644
--- a/fs/btrfs/delayed-ref.h
+++ b/fs/btrfs/delayed-ref.h
@@ -226,7 +226,7 @@  struct btrfs_data_ref {
 	/* For EXTENT_DATA_REF */
 
 	/* Inode which refers to this data extent */
-	u64 ino;
+	u64 objectid;
 
 	/*
 	 * file_offset - extent_offset
diff --git a/fs/btrfs/ref-verify.c b/fs/btrfs/ref-verify.c
index 94bbb7ef9a13..cf531255ab76 100644
--- a/fs/btrfs/ref-verify.c
+++ b/fs/btrfs/ref-verify.c
@@ -688,7 +688,7 @@  int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
 		owner = generic_ref->tree_ref.level;
 	} else if (!parent) {
 		ref_root = generic_ref->ref_root;
-		owner = generic_ref->data_ref.ino;
+		owner = generic_ref->data_ref.objectid;
 		offset = generic_ref->data_ref.offset;
 	}
 	metadata = owner < BTRFS_FIRST_FREE_OBJECTID;