From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>,
Su Yue <suy.fnst@cn.fujitsu.com>, Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org, dsterba@suse.cz
Subject: Re: [PATCH v2 3/3] btrfs-progs: check: Cleanup all checkpatch error and warning
Date: Thu, 1 Feb 2018 10:28:13 +0200 [thread overview]
Message-ID: <88127c19-73ba-a376-327c-6be93a63d251@suse.com> (raw)
In-Reply-To: <56a60440-c066-4f24-257d-21e7efa0ff38@gmx.com>
On 1.02.2018 09:48, Qu Wenruo wrote:
>
>
> On 2018年02月01日 15:08, Su Yue wrote:
>>
>>
>> On 02/01/2018 02:45 PM, Qu Wenruo wrote:
>>> Since we're moving tons of codes, it's a good idea to fix all errors and
> [snip]
>>> }
>>> @@ -2500,7 +2507,8 @@ static int repair_extent_data_item(struct
>>> btrfs_trans_handle *trans,
>>> if (ret)
>>> goto out;
>>> eb = path.nodes[0];
>>> - ei = btrfs_item_ptr(eb, path.slots[0], struct
>>> btrfs_extent_item);
>>> + ei = btrfs_item_ptr(eb, path.slots[0],
>>> + struct btrfs_extent_item);
>>> btrfs_set_extent_refs(eb, ei, 0);
>>> btrfs_set_extent_generation(eb, ei, generation);
>>> @@ -2657,7 +2665,8 @@ static int check_extent_data_item(struct
>>> btrfs_root *root,
>>> }
>>> if (type == BTRFS_EXTENT_DATA_REF_KEY) {
>>> ref_root = btrfs_extent_data_ref_root(leaf, dref);
>>> - ref_objectid = btrfs_extent_data_ref_objectid(leaf, dref);
>>> + ref_objectid = btrfs_extent_data_ref_objectid(leaf,
>>> + dref);
>>> ref_offset = btrfs_extent_data_ref_offset(leaf, dref);
>>> if (ref_objectid == fi_key.objectid &&
>>> @@ -2820,8 +2829,8 @@ static int check_block_group_item(struct
>>> btrfs_fs_info *fs_info,
>>> if (!(bg_flags & BTRFS_BLOCK_GROUP_DATA)) {
>>> error(
>>> "bad extent[%llu, %llu) type mismatch with chunk",
>>> - extent_key.objectid,
>>> - extent_key.objectid + extent_key.offset);
>>> + extent_key.objectid,
>>> + extent_key.objectid + extent_key.offset);
>>> err |= CHUNK_TYPE_MISMATCH;
>>> }
>>> } else if (flags & BTRFS_EXTENT_FLAG_TREE_BLOCK) {
>>> @@ -3175,7 +3184,8 @@ static int check_extent_data_backref(struct
>>> btrfs_fs_info *fs_info,
>>> btrfs_header_owner(leaf) != root_id)
>>> goto next;
>>> btrfs_item_key_to_cpu(leaf, &key, slot);
>>> - if (key.objectid != objectid || key.type !=
>>> BTRFS_EXTENT_DATA_KEY)
>>> + if (key.objectid != objectid || key.type !=
>>> + BTRFS_EXTENT_DATA_KEY)
>> if (key.objectid != objectid ||
>> key.type != BTRFS_EXTENT_DATA_KEY)
>> is more better.
>> Other changes are nice.
>
> I also thought about that, but that leaves too much space in previous line.
>
> Not sure what should be the best practice here.
Su's suggestion is more readable so I'd say go with it
>
> Thank,
> Qu
>>
>> Thanks,
>> Su
>
next prev parent reply other threads:[~2018-02-01 8:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 6:45 [PATCH v2 0/3] btrfs-progs: Split lowmem mode check to its own Qu Wenruo
2018-02-01 6:45 ` [PATCH v2 2/3] btrfs-progs: check/lowmem: Cleanup unnecessary _v2 suffix Qu Wenruo
2018-02-01 6:45 ` [PATCH v2 3/3] btrfs-progs: check: Cleanup all checkpatch error and warning Qu Wenruo
2018-02-01 7:08 ` Su Yue
2018-02-01 7:48 ` Qu Wenruo
2018-02-01 8:28 ` Nikolay Borisov [this message]
2018-02-01 15:06 ` David Sterba
2018-02-01 8:36 ` Nikolay Borisov
2018-02-01 9:20 ` Qu Wenruo
2018-02-01 16:05 ` [PATCH v2 0/3] btrfs-progs: Split lowmem mode check to its own David Sterba
2018-02-02 1:36 ` Qu Wenruo
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=88127c19-73ba-a376-327c-6be93a63d251@suse.com \
--to=nborisov@suse.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=suy.fnst@cn.fujitsu.com \
--cc=wqu@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).