mbox series

[RFC,0/4] md/md-bitmap: support to build md-bitmap as kernel module

Message ID 20241024131325.2250880-1-yukuai1@huaweicloud.com (mailing list archive)
Headers show
Series md/md-bitmap: support to build md-bitmap as kernel module | expand

Message

Yu Kuai Oct. 24, 2024, 1:13 p.m. UTC
From: Yu Kuai <yukuai3@huawei.com>

Now that all implementations are internal, it's sensible to build it as
kernel module now.

Currently, if md-bitmap is build as module and the module is not loaded,
creating new array will try to load the module, regardless that bitmap
is used or not. There are still lots of cleanups to prevent
deferencing "mddev->bitmap_ops" for the array without bitmap.

Yu Kuai (4):
  md/md-bitmap: remove the parameter 'init' for bitmap_ops->resize()
  md/md-bitmap: merge md_bitmap_group into bitmap_operations
  md: export some helpers
  md/md-bitmap: support to build md-bitmap as kernel module

 drivers/md/Kconfig      |  15 +++++
 drivers/md/Makefile     |   4 +-
 drivers/md/dm-raid.c    |   2 +-
 drivers/md/md-bitmap.c  |  38 +++++++++++--
 drivers/md/md-bitmap.h  |  13 +++--
 drivers/md/md-cluster.c |   2 +-
 drivers/md/md.c         | 118 +++++++++++++++++++++++++++++++++-------
 drivers/md/md.h         |  12 +++-
 drivers/md/raid1.c      |   2 +-
 drivers/md/raid10.c     |   8 +--
 drivers/md/raid5.c      |   2 +-
 11 files changed, 172 insertions(+), 44 deletions(-)