Re: [PATCH v2 1/4] null_blk: do not fail the module load with zero devices

From: Bart Van Assche
Date: Fri Sep 13 2019 - 18:17:58 EST


On 9/13/19 3:02 PM, Andrà Almeida wrote:
The module load should fail only if there is something wrong with the
configuration or if an error prevents it to work properly. The module
should be able to be loaded with (nr_device == 0), since it will not
trigger errors or be in malfunction state. Preventing loading with zero
devices also breaks applications that configures this module using
configfs API. Remove the nr_device check to fix this.

I just noticed that this patch is necessary to unbreak blktests. The srp tests fail as follows with Jens' for-next branch:

modprobe: ERROR: could not insert 'null_blk': Invalid argument

I think that error is triggered by the following statement in common/multipath-over-rdma:

modprobe null_blk nr_devices=0 || return $?

Bart.