mbox series

[0/4] null_blk cleanup and device naming improvements

Message ID 20220419110038.3728406-1-damien.lemoal@opensource.wdc.com (mailing list archive)
Headers show
Series null_blk cleanup and device naming improvements | expand

Message

Damien Le Moal April 19, 2022, 11 a.m. UTC
The first 3 patches of this series are simple code cleanups.

The last patch changes the device naming scheme for devices created
through configfs: the configfs device directory name is used as the disk
name. This name is also checked against potentially exiting nullb
devices created during modprobe when the nr_device module option is not
0.

This series falls short of pre-populating configfs with directories
corresponding to the devices created during modprobe as this is not
easily feasible. However, the added device name check avoids mistakes by
users about reusing configfs names already used by existing devices.

Damien Le Moal (4):
  block: null_blk: Fix code style issues
  block: null_blk: Cleanup device creation and deletion
  block: null_blk: Cleanup messages
  block: null_blk: Improve device creation with configfs

 drivers/block/null_blk/main.c  | 113 +++++++++++++++++++++++----------
 drivers/block/null_blk/zoned.c |  14 ++--
 2 files changed, 85 insertions(+), 42 deletions(-)