All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 1/3] btrfs-progs: check: remove unused found_key variable in walk_down_tree()
Date: Mon, 12 Sep 2016 15:01:47 +0800	[thread overview]
Message-ID: <57D652DB.6060507@cn.fujitsu.com> (raw)
In-Reply-To: <20160829162217.GW16983@twin.jikos.cz>

Hi,

On 08/30/2016 12:22 AM, David Sterba wrote:
> On Thu, Aug 25, 2016 at 01:20:59PM +0800, Wang Xiaoguang wrote:
>> Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
>> ---
>>   cmds-check.c | 5 -----
>>   1 file changed, 5 deletions(-)
>>
>> diff --git a/cmds-check.c b/cmds-check.c
>> index 0ddfd24..1cd0421 100644
>> --- a/cmds-check.c
>> +++ b/cmds-check.c
>> @@ -3737,7 +3737,6 @@ static int check_fs_root(struct btrfs_root *root,
>>   		path.slots[level] = 0;
>>   	} else {
>>   		struct btrfs_key key;
>> -		struct btrfs_disk_key found_key;
>>   
>>   		btrfs_disk_key_to_cpu(&key, &root_item->drop_progress);
>>   		level = root_item->drop_level;
>> @@ -3745,10 +3744,6 @@ static int check_fs_root(struct btrfs_root *root,
>>   		wret = btrfs_search_slot(NULL, root, &key, &path, 0, 0);
>>   		if (wret < 0)
>>   			goto skip_walking;
>> -		btrfs_node_key(path.nodes[level], &found_key,
>> -				path.slots[level]);
>> -		WARN_ON(memcmp(&found_key, &root_item->drop_progress,
>> -					sizeof(found_key)));
> It's not unused, the WARN_ON is an if in disguise, ane memcmp does the
> check, am I missing something here?
No, you're right.
I mistakenly took the memcmp() as memcpy(), sorry.

Regards,
Xiaoguang Wang
>




      parent reply	other threads:[~2016-09-12  7:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25  5:20 [PATCH 1/3] btrfs-progs: check: remove unused found_key variable in walk_down_tree() Wang Xiaoguang
2016-08-25  5:21 ` [PATCH 2/3] btrfs-progs: check: make low memory mode support partially dropped snapshots Wang Xiaoguang
2016-09-09 15:32   ` David Sterba
2016-08-25  5:21 ` [PATCH 3/3] btrfs-progs: tests: add 021-partially-dropped-snapshot-case Wang Xiaoguang
2016-08-29 16:22 ` [PATCH 1/3] btrfs-progs: check: remove unused found_key variable in walk_down_tree() David Sterba
2016-09-09 15:36   ` David Sterba
2016-09-12  7:01   ` Wang Xiaoguang [this message]

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=57D652DB.6060507@cn.fujitsu.com \
    --to=wangxg.fnst@cn.fujitsu.com \
    --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.