[v2,2/3] btrfs-progs: map-logical: Use btrfs_next_extent_item()
diff mbox

Message ID CA+X5Wn4GAp9cLqCKUiu4H6PSAvi9e0quDsQOjarZbS5EDWmspA@mail.gmail.com
State New
Headers show

Commit Message

james harvey June 7, 2018, 7:20 a.m. UTC
btrfs_next_extent_item() looks for BTRFS_EXTENT_ITEM_KEY and BTRFS_METADATA_KEY,
which are the types we're looking for.

Signed-off-by: James Harvey <jamespharvey20@gmail.com>
---
 btrfs-map-logical.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
2.17.0
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Su Yue June 7, 2018, 8:50 a.m. UTC | #1
On 06/07/2018 03:20 PM, james harvey wrote:
> btrfs_next_extent_item() looks for BTRFS_EXTENT_ITEM_KEY and BTRFS_METADATA_KEY,
> which are the types we're looking for.
> 
> Signed-off-by: James Harvey <jamespharvey20@gmail.com>

Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com>

> ---
>   btrfs-map-logical.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c
> index 2451012b..8a41b037 100644
> --- a/btrfs-map-logical.c
> +++ b/btrfs-map-logical.c
> @@ -83,7 +83,8 @@ again:
>                          ret = btrfs_previous_extent_item(fs_info->extent_root,
>                                                           path, 0);
>                  else
> -                       ret = btrfs_next_item(fs_info->extent_root, path);
> +                       ret = btrfs_next_extent_item(fs_info->extent_root,
> +                                                    path);
>                  if (ret)
>                          goto out;
>                  goto again;
> --
> 2.17.0
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Sterba July 18, 2018, 2 p.m. UTC | #2
On Thu, Jun 07, 2018 at 03:20:02AM -0400, james harvey wrote:
> btrfs_next_extent_item() looks for BTRFS_EXTENT_ITEM_KEY and BTRFS_METADATA_KEY,
> which are the types we're looking for.
> 
> Signed-off-by: James Harvey <jamespharvey20@gmail.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c
index 2451012b..8a41b037 100644
--- a/btrfs-map-logical.c
+++ b/btrfs-map-logical.c
@@ -83,7 +83,8 @@  again:
                        ret = btrfs_previous_extent_item(fs_info->extent_root,
                                                         path, 0);
                else
-                       ret = btrfs_next_item(fs_info->extent_root, path);
+                       ret = btrfs_next_extent_item(fs_info->extent_root,
+                                                    path);
                if (ret)
                        goto out;
                goto again;