null_blk: add usage hints for NVM
authorYasuaki Ishimatsu <yasu.isimatu@gmail.com>
Wed, 16 Nov 2016 15:26:11 +0000 (08:26 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 16 Nov 2016 15:26:11 +0000 (08:26 -0700)
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 <isimatu.yasuaki@jp.fujitsu.com>
Massaged the text a bit.

Signed-off-by: Jens Axboe <axboe@fb.com>
Documentation/block/null_blk.txt
drivers/block/null_blk.c

index d8880ca30af4c35d562c0f77b1b3a56c3ff6e1d7..3140dbd860d8c72c341b4559264c532d062a6f35 100644 (file)
@@ -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.
index ba6f4a2e73db506b5fde324b5e840dcb2a50a7f2..4943ee22716e04a3b1427161f28ca9bafdd68a95 100644 (file)
@@ -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) {}