mbox series

[0/3] Add {init, exit}_sequence_fs() helper function

Message ID 20240711074859.366088-1-youling.tang@linux.dev (mailing list archive)
Headers show
Series Add {init, exit}_sequence_fs() helper function | expand

Message

Youling Tang July 11, 2024, 7:48 a.m. UTC
This series provides the {init, exit}_sequence_fs() helper functions and
applies to f2fs and ext4, similar to btrfs.

Youling Tang (3):
  f2fs: make module init/exit match their sequence
  ext4: make module init/exit match their sequence
  fs: Add {init, exit}_sequence_fs() helper function

 fs/btrfs/super.c   |  36 +--------
 fs/ext4/super.c    | 142 +++++++++++++++---------------------
 fs/f2fs/debug.c    |   3 +-
 fs/f2fs/f2fs.h     |   4 +-
 fs/f2fs/super.c    | 178 ++++++++++++++++++---------------------------
 include/linux/fs.h |  38 ++++++++++
 6 files changed, 173 insertions(+), 228 deletions(-)

Comments

Christoph Hellwig July 11, 2024, 8:26 a.m. UTC | #1
Can we please stop this boilerplate code an instead our __init/__exit
sections to supper multiple entires per module.  This should be mostly
trivial, except that we'd probably want a single macro that has the
init and exit calls so that the order in the section is the same and
the unroll on failure can walk back form the given offset. e.g.
something like:

module_subinit(foo_bar_init, foo_bar_exit);
module_subinit(foo_bar2_init, foo_bar2_exit);
Youling Tang July 23, 2024, 8:44 a.m. UTC | #2
Hi, Christoph

On 11/07/2024 16:26, Christoph Hellwig wrote:
> Can we please stop this boilerplate code an instead our __init/__exit
> sections to supper multiple entires per module.  This should be mostly
> trivial, except that we'd probably want a single macro that has the
> init and exit calls so that the order in the section is the same and
> the unroll on failure can walk back form the given offset. e.g.
> something like:
>
> module_subinit(foo_bar_init, foo_bar_exit);
> module_subinit(foo_bar2_init, foo_bar2_exit);
>
>
Thanks for your suggestion,  I re-implemented it using section mode,
and the new patch set [1] has been sent.

[1]: 
https://lore.kernel.org/all/20240723083239.41533-1-youling.tang@linux.dev/T/#md81aaefe0c1fef70a0592d1580cbbb10ec9989b0

Thanks,
Youling.
Christoph Hellwig July 23, 2024, 1:37 p.m. UTC | #3
On Tue, Jul 23, 2024 at 04:44:14PM +0800, Youling Tang wrote:
> Thanks for your suggestion,  I re-implemented it using section mode,
> and the new patch set [1] has been sent.

Nice!  I'll review it.