From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Kent Overstreet <kent.overstreet@linux.dev>, <rcu@vger.kernel.org>
Cc: <paulmck@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/9] darray: lift from bcachefs
Date: Tue, 20 Aug 2024 18:00:04 -0700 [thread overview]
Message-ID: <ef1347e4-64e3-4068-89cb-cb6038972b9e@quicinc.com> (raw)
In-Reply-To: <20240819165939.745801-4-kent.overstreet@linux.dev>
On 8/19/24 09:59, Kent Overstreet wrote:
> dynamic arrays - inspired from CCAN darrays, basically c++ stl vectors.
>
> Used by thread_with_stdio, which is also being lifted from bcachefs for
> xfs.
>
> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
> ---
> MAINTAINERS | 7 +++
> fs/bcachefs/Makefile | 1 -
> fs/bcachefs/btree_node_scan_types.h | 2 +-
> fs/bcachefs/btree_types.h | 2 +-
> fs/bcachefs/btree_update.c | 2 +
> fs/bcachefs/btree_write_buffer_types.h | 2 +-
> fs/bcachefs/disk_accounting_types.h | 2 +-
> fs/bcachefs/fsck.c | 2 +-
> fs/bcachefs/journal_io.h | 2 +-
> fs/bcachefs/journal_sb.c | 2 +-
> fs/bcachefs/sb-downgrade.c | 3 +-
> fs/bcachefs/sb-errors_types.h | 2 +-
> fs/bcachefs/sb-members.h | 2 +-
> fs/bcachefs/subvolume.h | 1 -
> fs/bcachefs/subvolume_types.h | 2 +-
> fs/bcachefs/thread_with_file_types.h | 2 +-
> fs/bcachefs/util.h | 29 +-----------
> {fs/bcachefs => include/linux}/darray.h | 59 ++++++++++++++++---------
> include/linux/darray_types.h | 22 +++++++++
> lib/Makefile | 2 +-
> {fs/bcachefs => lib}/darray.c | 12 ++++-
> 21 files changed, 96 insertions(+), 64 deletions(-)
> rename {fs/bcachefs => include/linux}/darray.h (66%)
> create mode 100644 include/linux/darray_types.h
> rename {fs/bcachefs => lib}/darray.c (57%)
...
> diff --git a/fs/bcachefs/darray.c b/lib/darray.c
> similarity index 57%
> rename from fs/bcachefs/darray.c
> rename to lib/darray.c
> index b7d223f85873..b6868db7f956 100644
> --- a/fs/bcachefs/darray.c
> +++ b/lib/darray.c
> @@ -1,10 +1,14 @@
> // SPDX-License-Identifier: GPL-2.0
> +/*
> + * (C) 2022-2024 Kent Overstreet <kent.overstreet@linux.dev>
> + */
>
> +#include <linux/darray.h>
> #include <linux/log2.h>
> +#include <linux/module.h>
> #include <linux/slab.h>
> -#include "darray.h"
>
> -int __bch2_darray_resize(darray_char *d, size_t element_size, size_t new_size, gfp_t gfp)
> +int __darray_resize_slowpath(darray_char *d, size_t element_size, size_t new_size, gfp_t gfp)
> {
> if (new_size > d->size) {
> new_size = roundup_pow_of_two(new_size);
> @@ -23,3 +27,7 @@ int __bch2_darray_resize(darray_char *d, size_t element_size, size_t new_size, g
>
> return 0;
> }
> +EXPORT_SYMBOL_GPL(__darray_resize_slowpath);
> +
> +MODULE_AUTHOR("Kent Overstreet");
> +MODULE_LICENSE("GPL");
Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
description is missing"), a module without a MODULE_DESCRIPTION() will
result in a warning when built with make W=1. Recently, multiple
developers, including myself, have been eradicating these warnings
treewide, and to prevent new instances from being introduced I scan lore
for patches which contain a MODULE_LICENSE but do not contain a
MODULE_DESCRIPTION(). This patch was flagged.
Normally I just ask that a MODULE_DESCRIPTION() be added. But in this
case I don't see how this can ever be built as a module since it is part
of an obj-y rule, and hence, unless I'm missing something, will always
be built-in. So in this case I would suggest removing the MODULE_AUTHOR
and MODULE_LICENSE.
However, if you do anticipate this could be built as a module in the
future, please just add the MODULE_DESCRIPTION().
/jeff
next prev parent reply other threads:[~2024-08-21 1:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 16:59 [PATCH 0/9] rcu_pending Kent Overstreet
2024-08-19 16:59 ` [PATCH 1/9] lib/generic-radix-tree.c: genradix_ptr_inlined() Kent Overstreet
2024-08-19 16:59 ` [PATCH 2/9] lib/generic-radix-tree.c: add preallocation Kent Overstreet
2024-08-19 16:59 ` [PATCH 3/9] darray: lift from bcachefs Kent Overstreet
2024-08-21 1:00 ` Jeff Johnson [this message]
2024-08-19 16:59 ` [PATCH 4/9] vmalloc: is_vmalloc_addr_inlined() Kent Overstreet
2024-08-19 16:59 ` [PATCH 5/9] rcu: delete lockdep_assert_irqs_enabled() assert in start_poll_synchronize_rcu_common() Kent Overstreet
2024-08-19 21:11 ` Paul E. McKenney
2024-08-19 16:59 ` [PATCH 6/9] rcu: rcu_pending Kent Overstreet
2024-08-19 22:58 ` Paul E. McKenney
2024-08-19 23:59 ` Kent Overstreet
2024-08-26 14:44 ` Paul E. McKenney
2024-08-26 15:17 ` Kent Overstreet
2024-08-26 16:01 ` Paul E. McKenney
2024-08-26 17:09 ` Kent Overstreet
2024-08-30 19:01 ` Paul E. McKenney
2024-09-01 0:03 ` Kent Overstreet
2024-08-19 16:59 ` [PATCH 7/9] bcachefs: Rip out freelists from btree key cache Kent Overstreet
2024-08-19 16:59 ` [PATCH 8/9] bcachefs: key cache can now allocate from pending Kent Overstreet
2024-08-19 16:59 ` [PATCH 9/9] rcu: Switch kvfree_rcu() to new rcu_pending Kent Overstreet
2024-08-19 22:18 ` Paul E. McKenney
2024-08-19 23:05 ` Kent Overstreet
2024-08-19 23:07 ` [PATCH 0/9] rcu_pending Paul E. McKenney
2024-08-19 23:29 ` Kent Overstreet
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=ef1347e4-64e3-4068-89cb-cb6038972b9e@quicinc.com \
--to=quic_jjohnson@quicinc.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=rcu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®