All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Anasal | BDSU <roman.anasal@bdsu.de>
To: "dsterba@suse.cz" <dsterba@suse.cz>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] btrfs: send: fix invalid commands for inodes with changed type but same gen
Date: Mon, 11 Jan 2021 21:31:31 +0000	[thread overview]
Message-ID: <0363f5435d09d6fc0fdf4e680b408bfc96c8a698.camel@bdsu.de> (raw)
In-Reply-To: <20210111211529.GE6430@twin.jikos.cz>

On Mon, 2021-01-11 at 22:15 +0100, David Sterba wrote:
> On Mon, Jan 11, 2021 at 08:02:43PM +0100, Roman Anasal wrote:
> > --- a/fs/btrfs/send.c
> > +++ b/fs/btrfs/send.c
> > @@ -6299,12 +6299,18 @@ static int changed_inode(struct send_ctx
> > *sctx,
> >  		right_gen = btrfs_inode_generation(sctx->right_path-
> > >nodes[0],
> >  				right_ii);
> >  
> > +		u64 left_type = S_IFMT & btrfs_inode_mode(
> > +				sctx->left_path->nodes[0], left_ii);
> > +		u64 right_type = S_IFMT & btrfs_inode_mode(
> > +				sctx->right_path->nodes[0], right_ii);
> 
> Minor note, we don't use the declarations mixed with code, so the
> variables need to be declared separatelly, but I can fix that unless
> there's another reason to update and resend the patches.

Ah yes, I was quite unsure where to put the declarations and then
wanted to put them as close as possible to the usage and decided to put
them in the same "scope".
But just now I realised I was still thinking in the wrong programming
language and there is no "if-block-scope" in C :D

So I updated the commit respectively and can resend if needed.

  reply	other threads:[~2021-01-11 21:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 19:02 [PATCH 0/2] btrfs: send: correctly recreate changed inodes Roman Anasal
2021-01-11 19:02 ` [PATCH 1/2] btrfs: send: rename send_ctx.cur_inode_new_gen to cur_inode_recreated Roman Anasal
2021-01-11 19:02 ` [PATCH 2/2] btrfs: send: fix invalid commands for inodes with changed type but same gen Roman Anasal
2021-01-11 19:30   ` Andrei Borzenkov
2021-01-11 20:53     ` Roman Anasal | BDSU
2021-01-12 11:27       ` Filipe Manana
2021-01-12 12:07         ` Graham Cobb
2021-01-12 12:30           ` Filipe Manana
2021-01-12 13:10         ` Roman Anasal | BDSU
2021-01-12 13:54           ` Filipe Manana
2021-01-12 14:37             ` Roman Anasal | BDSU
2021-01-12 15:08               ` Filipe Manana
2021-01-11 21:15   ` David Sterba
2021-01-11 21:31     ` Roman Anasal | BDSU [this message]
2021-01-11 21:19   ` kernel test robot
2021-01-11 21:19     ` kernel test robot

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=0363f5435d09d6fc0fdf4e680b408bfc96c8a698.camel@bdsu.de \
    --to=roman.anasal@bdsu.de \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /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.