mbox series

[0/2] btrfs-progs: header cleanups

Message ID cover.1711837050.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs-progs: header cleanups | expand

Message

Qu Wenruo March 30, 2024, 10:24 p.m. UTC
[REPO]
https://github.com/adam900710/btrfs-progs/tree/headers_cleanup

This series is focusing on cleanup the unused headers.

This is mostly done by clangd, although it has some false alerts related
to macro usages of a header.

But still it's pretty awesome to cleanup a lot of unnecessary headers.
Only one special touch on pretty_size() macro, to change it to a static
inline function to workaround the clangd bug.

The first patch would do the main heavy lifting, meanwhile the second
patch is doing the BTRFS_FLAT_INCLUDES related cleanups for library-test
code.

Unfortunately I didn't touch anything inside crypto/*, the main reason
is I'm not confident enough to verify all the optimization for different
instructions.

(And even less motivation after the infamous recent XZ backdoor attempt,
 by a possibly state-sponsored sleeping agent, ruining the trust among
 open source community.)

Qu Wenruo (2):
  btrfs-progs: headers cleanup
  btrfs-progs: library-test: header and BTRFS_FLAT_INCLUDES cleanups

 btrfs-corrupt-block.c        |  1 -
 btrfs-sb-mod.c               |  2 --
 btrfs.c                      |  1 -
 cmds/device.c                |  1 -
 cmds/filesystem-du.c         |  1 -
 cmds/filesystem-usage.c      |  1 -
 cmds/inspect.c               |  3 ---
 cmds/quota.c                 |  1 -
 cmds/receive-dump.c          |  1 -
 cmds/receive.c               |  1 -
 cmds/reflink.c               |  2 --
 cmds/restore.c               |  1 -
 cmds/scrub.c                 |  3 ---
 common/device-scan.c         |  1 -
 common/open-utils.c          |  1 -
 common/path-utils.c          |  1 -
 common/send-stream.c         |  1 -
 common/send-utils.c          |  1 -
 common/string-utils.c        |  2 --
 common/units.h               |  7 ++++++-
 common/utils.c               |  1 -
 convert/main.c               |  1 -
 convert/source-ext2.c        |  1 -
 kernel-lib/mktables.c        |  5 +----
 kernel-shared/dir-item.c     |  1 -
 kernel-shared/extent-tree.c  |  1 -
 kernel-shared/file-item.c    |  1 -
 kernel-shared/file.c         |  2 --
 kernel-shared/inode-item.c   |  2 --
 kernel-shared/messages.c     |  1 -
 kernel-shared/root-tree.c    |  1 -
 kernel-shared/tree-checker.c |  1 -
 kernel-shared/uuid-tree.c    |  3 ---
 kernel-shared/zoned.c        |  1 -
 libbtrfs/crc32c.c            |  5 ++---
 mkfs/common.c                |  1 -
 mkfs/rootdir.c               |  1 -
 tests/fsstress.c             | 25 ++++++++++++-------------
 tests/ioctl-test.c           |  1 -
 tests/library-test.c         | 22 +++-------------------
 40 files changed, 24 insertions(+), 86 deletions(-)

--
2.44.0

Comments

Qu Wenruo April 2, 2024, 10:05 p.m. UTC | #1
Please drop the series.

As David mentioned in the github pull request, the LSP server is pretty 
aggressive as it can fully understand the different configurations.

We need a more comprehensive tests on all possible configuration/build 
targets/linked library etc.

Thanks,
Qu

在 2024/3/31 08:54, Qu Wenruo 写道:
> [REPO]
> https://github.com/adam900710/btrfs-progs/tree/headers_cleanup
> 
> This series is focusing on cleanup the unused headers.
> 
> This is mostly done by clangd, although it has some false alerts related
> to macro usages of a header.
> 
> But still it's pretty awesome to cleanup a lot of unnecessary headers.
> Only one special touch on pretty_size() macro, to change it to a static
> inline function to workaround the clangd bug.
> 
> The first patch would do the main heavy lifting, meanwhile the second
> patch is doing the BTRFS_FLAT_INCLUDES related cleanups for library-test
> code.
> 
> Unfortunately I didn't touch anything inside crypto/*, the main reason
> is I'm not confident enough to verify all the optimization for different
> instructions.
> 
> (And even less motivation after the infamous recent XZ backdoor attempt,
>   by a possibly state-sponsored sleeping agent, ruining the trust among
>   open source community.)
> 
> Qu Wenruo (2):
>    btrfs-progs: headers cleanup
>    btrfs-progs: library-test: header and BTRFS_FLAT_INCLUDES cleanups
> 
>   btrfs-corrupt-block.c        |  1 -
>   btrfs-sb-mod.c               |  2 --
>   btrfs.c                      |  1 -
>   cmds/device.c                |  1 -
>   cmds/filesystem-du.c         |  1 -
>   cmds/filesystem-usage.c      |  1 -
>   cmds/inspect.c               |  3 ---
>   cmds/quota.c                 |  1 -
>   cmds/receive-dump.c          |  1 -
>   cmds/receive.c               |  1 -
>   cmds/reflink.c               |  2 --
>   cmds/restore.c               |  1 -
>   cmds/scrub.c                 |  3 ---
>   common/device-scan.c         |  1 -
>   common/open-utils.c          |  1 -
>   common/path-utils.c          |  1 -
>   common/send-stream.c         |  1 -
>   common/send-utils.c          |  1 -
>   common/string-utils.c        |  2 --
>   common/units.h               |  7 ++++++-
>   common/utils.c               |  1 -
>   convert/main.c               |  1 -
>   convert/source-ext2.c        |  1 -
>   kernel-lib/mktables.c        |  5 +----
>   kernel-shared/dir-item.c     |  1 -
>   kernel-shared/extent-tree.c  |  1 -
>   kernel-shared/file-item.c    |  1 -
>   kernel-shared/file.c         |  2 --
>   kernel-shared/inode-item.c   |  2 --
>   kernel-shared/messages.c     |  1 -
>   kernel-shared/root-tree.c    |  1 -
>   kernel-shared/tree-checker.c |  1 -
>   kernel-shared/uuid-tree.c    |  3 ---
>   kernel-shared/zoned.c        |  1 -
>   libbtrfs/crc32c.c            |  5 ++---
>   mkfs/common.c                |  1 -
>   mkfs/rootdir.c               |  1 -
>   tests/fsstress.c             | 25 ++++++++++++-------------
>   tests/ioctl-test.c           |  1 -
>   tests/library-test.c         | 22 +++-------------------
>   40 files changed, 24 insertions(+), 86 deletions(-)
> 
> --
> 2.44.0
> 
>
David Sterba April 3, 2024, 1:45 p.m. UTC | #2
On Wed, Apr 03, 2024 at 08:35:07AM +1030, Qu Wenruo wrote:
> Please drop the series.
> 
> As David mentioned in the github pull request, the LSP server is pretty 
> aggressive as it can fully understand the different configurations.
> 
> We need a more comprehensive tests on all possible configuration/build 
> targets/linked library etc.

A bit more coverage done, the btrfs.box target is built by default
everywhere and some CI image builds also configure with --experimental.
The static has dependencies that may not exist everywhere but the
coverage seems fine for now.