* [PATCH] Btrfs: remove unnecessary inode generation lookup in send
@ 2014-03-18 17:56 Filipe David Borba Manana
2014-03-20 3:14 ` Liu Bo
0 siblings, 1 reply; 2+ messages in thread
From: Filipe David Borba Manana @ 2014-03-18 17:56 UTC (permalink / raw)
To: linux-btrfs; +Cc: Filipe David Borba Manana
No need to search in the send tree for the generation number of the inode,
we already have it in the recorded_ref structure passed to us.
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
---
fs/btrfs/send.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 5d757ee..db4b10c 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -3179,7 +3179,7 @@ static int wait_for_parent_move(struct send_ctx *sctx,
int ret;
u64 ino = parent_ref->dir;
u64 parent_ino_before, parent_ino_after;
- u64 new_gen, old_gen;
+ u64 old_gen;
struct fs_path *path_before = NULL;
struct fs_path *path_after = NULL;
int len1, len2;
@@ -3198,12 +3198,7 @@ static int wait_for_parent_move(struct send_ctx *sctx,
else if (ret < 0)
return ret;
- ret = get_inode_info(sctx->send_root, ino, NULL, &new_gen,
- NULL, NULL, NULL, NULL);
- if (ret < 0)
- return ret;
-
- if (new_gen != old_gen)
+ if (parent_ref->dir_gen != old_gen)
return 0;
path_before = fs_path_alloc();
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Btrfs: remove unnecessary inode generation lookup in send
2014-03-18 17:56 [PATCH] Btrfs: remove unnecessary inode generation lookup in send Filipe David Borba Manana
@ 2014-03-20 3:14 ` Liu Bo
0 siblings, 0 replies; 2+ messages in thread
From: Liu Bo @ 2014-03-20 3:14 UTC (permalink / raw)
To: Filipe David Borba Manana; +Cc: linux-btrfs
On Tue, Mar 18, 2014 at 05:56:06PM +0000, Filipe David Borba Manana wrote:
> No need to search in the send tree for the generation number of the inode,
> we already have it in the recorded_ref structure passed to us.
>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
-liubo
> Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
> ---
> fs/btrfs/send.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
> index 5d757ee..db4b10c 100644
> --- a/fs/btrfs/send.c
> +++ b/fs/btrfs/send.c
> @@ -3179,7 +3179,7 @@ static int wait_for_parent_move(struct send_ctx *sctx,
> int ret;
> u64 ino = parent_ref->dir;
> u64 parent_ino_before, parent_ino_after;
> - u64 new_gen, old_gen;
> + u64 old_gen;
> struct fs_path *path_before = NULL;
> struct fs_path *path_after = NULL;
> int len1, len2;
> @@ -3198,12 +3198,7 @@ static int wait_for_parent_move(struct send_ctx *sctx,
> else if (ret < 0)
> return ret;
>
> - ret = get_inode_info(sctx->send_root, ino, NULL, &new_gen,
> - NULL, NULL, NULL, NULL);
> - if (ret < 0)
> - return ret;
> -
> - if (new_gen != old_gen)
> + if (parent_ref->dir_gen != old_gen)
> return 0;
>
> path_before = fs_path_alloc();
> --
> 1.7.10.4
>
> --
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-20 3:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-18 17:56 [PATCH] Btrfs: remove unnecessary inode generation lookup in send Filipe David Borba Manana
2014-03-20 3:14 ` Liu Bo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.