All of lore.kernel.org
 help / color / mirror / Atom feed
From: Filipe Manana <fdmanana@gmail.com>
To: robbieko <robbieko@synology.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 4/5] Btrfs: incremental send, add gen check in did_overwrite_ref
Date: Wed, 12 Oct 2016 10:14:42 +0100	[thread overview]
Message-ID: <CAL3q7H4eRChWT8kPvrzMSmqbfroMoZi5GkDxd8w+Ved5Y_VviA@mail.gmail.com> (raw)
In-Reply-To: <1476259970-1866-5-git-send-email-robbieko@synology.com>

On Wed, Oct 12, 2016 at 9:12 AM, robbieko <robbieko@synology.com> wrote:
> From: Robbie Ko <robbieko@synology.com>
>
> There a some case similar as before.

As before what?
Each change log should be complete and the reader is not supposed to
guess what's the previous patch or commit this is referring to.
Imagine yourself or someone else reading the change log some time
after this is committed to a git tree. How does he/she figures out
what is "before", what commit or patch is it?

> add check parent generation in the did_overwrite_ref.

Please add some explanation of what problem is being fixed and how.
This change log has absolutely no value.

Also, can you please start sending xfstests too?
Last batch of send fixes you've sent, I've asked you to do them, but
you totally ignored it and later on I had to do them myself and
rewrite all change logs (and remove some unnecessary code).

Thanks.

>
> Signed-off-by: Robbie Ko <robbieko@synology.com>
> ---
>  fs/btrfs/send.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
> index d908624..e090db2 100644
> --- a/fs/btrfs/send.c
> +++ b/fs/btrfs/send.c
> @@ -1939,6 +1939,19 @@ static int did_overwrite_ref(struct send_ctx *sctx,
>         if (ret <= 0)
>                 goto out;
>
> +       if (dir != BTRFS_FIRST_FREE_OBJECTID) {
> +               ret = get_inode_info(sctx->send_root, dir, NULL, &gen, NULL,
> +                                    NULL, NULL, NULL);
> +               if (ret < 0 && ret != -ENOENT)
> +                       goto out;
> +               if (ret) {
> +                       ret = 0;
> +                       goto out;
> +               }
> +               if (gen != dir_gen)
> +                       goto out;
> +       }
> +
>         /* check if the ref was overwritten by another ref */
>         ret = lookup_dir_item_inode(sctx->send_root, dir, name, name_len,
>                         &ow_inode, &other_type);
> --
> 1.9.1
>
> --
> 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



-- 
Filipe David Manana,

"People will forget what you said,
 people will forget what you did,
 but people will never forget how you made them feel."

  reply	other threads:[~2016-10-12 11:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12  8:12 [PATCH 0/5] Btrfs: incremental send, fix serval case for root and gen robbieko
2016-10-12  8:12 ` [PATCH 1/5] Btrfs: incremental send, fix don't skip root inode in overwrite_ref robbieko
2016-10-12  9:09   ` Filipe Manana
2016-10-12  8:12 ` [PATCH 2/5] Btrfs: incremental send, add gen for is_waiting_for_rm when some corner case robbieko
2016-10-12  9:11   ` Filipe Manana
2016-10-12  8:12 ` [PATCH 3/5] Btrfs: incremental send, add gen in waiting_dir_move for " robbieko
2016-10-12  9:13   ` Filipe Manana
2016-10-12  8:12 ` [PATCH 4/5] Btrfs: incremental send, add gen check in did_overwrite_ref robbieko
2016-10-12  9:14   ` Filipe Manana [this message]
2016-10-12  8:12 ` [PATCH 5/5] Btrfs: incremental send, add gen check if has waiting_dir_move in the will_overwrite_ref robbieko
2016-10-12  9:15   ` Filipe Manana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL3q7H4eRChWT8kPvrzMSmqbfroMoZi5GkDxd8w+Ved5Y_VviA@mail.gmail.com \
    --to=fdmanana@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=robbieko@synology.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.