Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/6] btrfs-progs: remove unused header for tune/main.c
Date: Wed, 3 Apr 2024 08:00:11 +1030	[thread overview]
Message-ID: <e184d249-a4e5-4031-a152-95e7718877c7@gmx.com> (raw)
In-Reply-To: <20240402184216.GE14596@twin.jikos.cz>



在 2024/4/3 05:12, David Sterba 写道:
> On Tue, Mar 26, 2024 at 10:52:41AM +1030, Qu Wenruo wrote:
>> My clangd LSP server reports warning that "common/parse-utils.h" is not
>> utilized at all.
>
> Please be careful about removing headers, the LSP depends on the
> build flags and reports symbols or headers only for the last configured
> state.
>
> In this case removing parse-utils.h causes compilation error in
> experimental mode because of
>
> 287 #if EXPERIMENTAL
> 288                 case GETOPT_VAL_CSUM:
> 289                         btrfs_warn_experimental(
> 290                                 "Switching checksums is experimental, do not use for valuable data!");
> 291                         ctree_flags |= OPEN_CTREE_SKIP_CSUM_CHECK;
> 292                         csum_type = parse_csum_type(optarg);
>                                          ^^^^^^^^^^^^^^^^^^^^^^^
>
> 293                         btrfstune_cmd_groups[CSUM_CHANGE] = true;
> 294                         break;
> 295 #endif
>
> Some build checks or targets could be missing so we'd lack coverage and
> early warnings during development, this needs to be fixed.

Indeed.

Although I don't think early checks in headers would be a problem.

If a header never got included, then the header itself is not really
needed, meanwhile the checks in headers only need to be run once, thus
it's not a big deal when the early checks got executed.

>
> Builds that change LSP state (and combinations):
>
> - make box
> - make static box.static
> - various D= values and modes
> - configure --experimental
> - possibly different includes for glibc and musl defining a symbol
>    indirectly

I'll do more checks not only with the different configs, but also more
manual inspection into the dropped headers.

Thanks,
Qu

  reply	other threads:[~2024-04-02 21:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26  0:22 [PATCH 0/6] btrfs-progs: zoned devices support for bgt feature Qu Wenruo
2024-03-26  0:22 ` [PATCH 1/6] btrfs-progs: remove unused header for tune/main.c Qu Wenruo
2024-04-02 18:42   ` David Sterba
2024-04-02 21:30     ` Qu Wenruo [this message]
2024-03-26  0:22 ` [PATCH 2/6] btrfs-progs: tune: add the missing newline for --convert-from-block-group-tree Qu Wenruo
2024-03-26  0:22 ` [PATCH 3/6] btrfs-progs: mkfs: use proper zoned compatible write for bgt feature Qu Wenruo
2024-03-26  0:22 ` [PATCH 4/6] btrfs-progs: tune: properly open zoned devices for RW Qu Wenruo
2024-03-26  0:22 ` [PATCH 5/6] btrfs-progs: tests-mkfs: add test case for zoned block group tree feature Qu Wenruo
2024-03-26  0:22 ` [PATCH 6/6] btrfs-progs: tests-misc: add a test case to check zoned bgt conversion Qu Wenruo
2024-03-26 16:53 ` [PATCH 0/6] btrfs-progs: zoned devices support for bgt feature Johannes Thumshirn
2024-03-27  1:23 ` Naohiro Aota
2024-03-27 23:52 ` David Sterba

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=e184d249-a4e5-4031-a152-95e7718877c7@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --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