Skip to content

Commit

Permalink
null_blk: add usage hints for NVM
Browse files Browse the repository at this point in the history
If CONFIG_NVM is disabled, loading null_block module with use_lightnvm=1
fails. But there are no messages and documents related to the failure.

Add the appropriate error message.

Signed-off-by: Yasuaki Ishimatsu <[email protected]>

Massaged the text a bit.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
yishimatsu authored and axboe committed Nov 16, 2016
1 parent 0a6219a commit 92153d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/block/null_blk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ use_per_node_hctx=[0/1]: Default: 0
queue for each CPU node in the system.

use_lightnvm=[0/1]: Default: 0
Register device with LightNVM. Requires blk-mq to be used.
Register device with LightNVM. Requires blk-mq and CONFIG_NVM to be enabled.
1 change: 1 addition & 0 deletions drivers/block/null_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ static void null_nvm_unregister(struct nullb *nullb)
#else
static int null_nvm_register(struct nullb *nullb)
{
pr_err("null_blk: CONFIG_NVM needs to be enabled for LightNVM\n");
return -EINVAL;
}
static void null_nvm_unregister(struct nullb *nullb) {}
Expand Down

0 comments on commit 92153d3

Please sign in to comment.