mbox series

[v2,0/4] null_blk cleanup and device naming improvements

Message ID 20220420005718.3780004-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 20, 2022, 12:57 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.

Changes from v1:
* Modified patch 3 to use the pr_fmt() macro instead of manually adding
  null_blk prefix to messages.
* Fixed patch 4 commit message

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  | 91 +++++++++++++++++++++++++---------
 drivers/block/null_blk/zoned.c |  7 ++-
 2 files changed, 73 insertions(+), 25 deletions(-)

Comments

Jens Axboe May 3, 2022, 8:03 p.m. UTC | #1
On Wed, 20 Apr 2022 09:57:14 +0900, Damien Le Moal wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/4] block: null_blk: Fix code style issues
      commit: 8ea7b68edc5fd7b257759fa8588f7f8b57fedd51
[2/4] block: null_blk: Cleanup device creation and deletion
      commit: 2fdd541e4c7288f09077842654adc925b81ec620
[3/4] block: null_blk: Cleanup messages
      commit: 12e995654f2ef62dad1205629a3cd3c2d7cd405b
[4/4] block: null_blk: Improve device creation with configfs
      commit: 9986ac16c508d613b371a902a0c53b22bac195ee

Best regards,