From: Anand Jain <anand.jain@oracle.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/7] btrfs-progs: rename struct open_ctree_flags to open_ctree_args
Date: Thu, 8 Jun 2023 15:10:39 +0800 [thread overview]
Message-ID: <c657c159-aff1-5cd6-cd10-b5ab271bb80d@oracle.com> (raw)
In-Reply-To: <ed6225ca-2580-de48-4d2e-bf637ead2993@gmx.com>
On 08/06/2023 14:14, Qu Wenruo wrote:
>
>
> On 2023/6/8 14:01, Anand Jain wrote:
>> The struct open_ctree_flags currently holds arguments for
>> open_ctree_fs_info(), it can be confusing when mixed with a local
>> variable
>> named open_ctree_flags as below in the function cmd_inspect_dump_tree().
>>
>> cmd_inspect_dump_tree()
>> ::
>> struct open_ctree_flags ocf = { 0 };
>> ::
>> unsigned open_ctree_flags;
>>
>> So rename struct open_ctree_flags to struct open_ctree_args.
>
> I don't think this is a big deal.
>
> Any LSP server and compiler can handle it correct.
>
> Furthermore the rename would make a lot of @ocf variables loses its
> meaning. (The patch doesn't rename it to oca).
>
> To me, the better solution would be remove local variable
> open_ctree_flags completely, and do all the flags setting using
> ocf.flags instead.
s/open_ctree_flags/open_ctree_args makes sense as this struct is
not just about the flags.
struct open_ctree_args {
const char *filename;
u64 sb_bytenr;
u64 root_tree_bytenr;
u64 chunk_tree_bytenr;
unsigned flags;
};
PS:
We also have
enum btrfs_open_ctree_flags {
::
}
Thanks, Anand
next prev parent reply other threads:[~2023-06-08 7:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 6:00 [PATCH 0/7 v2] btrfs-progs: cleanup and preparatory around device scan Anand Jain
2023-06-08 6:00 ` [PATCH 1/7] btrfs-progs: check_mounted_where: declare is_btrfs as bool Anand Jain
2023-06-08 6:11 ` Qu Wenruo
2023-06-08 6:00 ` [PATCH 2/7] btrfs-progs: check_mounted_where: pack varibles type by size Anand Jain
2023-06-08 6:11 ` Qu Wenruo
2023-06-08 12:38 ` David Sterba
2023-06-11 10:21 ` Anand Jain
2023-06-08 6:01 ` [PATCH 3/7] btrfs-progs: rename struct open_ctree_flags to open_ctree_args Anand Jain
2023-06-08 6:14 ` Qu Wenruo
2023-06-08 7:10 ` Anand Jain [this message]
2023-06-08 7:28 ` Qu Wenruo
2023-06-11 10:57 ` Anand Jain
2023-06-08 6:01 ` [PATCH 4/7] btrfs-progs: device_list_add: optimize arguments drop devid Anand Jain
2023-06-08 6:18 ` Qu Wenruo
2023-06-08 6:01 ` [PATCH 5/7] btrfs-progs: btrfs_scan_one_device: drop local variable ret Anand Jain
2023-06-08 6:22 ` Qu Wenruo
2023-06-08 12:42 ` David Sterba
2023-06-11 11:12 ` Anand Jain
2023-06-08 6:01 ` [PATCH 6/7] btrfs-progs: factor out btrfs_scan_stdin_devices Anand Jain
2023-06-08 6:24 ` Qu Wenruo
2023-06-08 12:43 ` David Sterba
2023-06-08 6:01 ` [PATCH 7/7] btrfs-progs: refactor check_where_mounted with noscan argument Anand Jain
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=c657c159-aff1-5cd6-cd10-b5ab271bb80d@oracle.com \
--to=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.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