Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034120AbcJ0P4Q (ORCPT ); Thu, 27 Oct 2016 11:56:16 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:34702 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933914AbcJ0P4P (ORCPT ); Thu, 27 Oct 2016 11:56:15 -0400 Subject: [PATCH] null_blk: Add notes to use LightNVM To: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org From: Yasuaki Ishimatsu Cc: axboe@kernel.dk Message-ID: <37a5a6a3-cd8b-db98-b4f3-7bd66a5bf4d8@gmail.com> Date: Thu, 27 Oct 2016 11:56:17 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1349 Lines: 36 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. So the patch adds the notes to use LightNVM. Signed-off-by: Yasuaki Ishimatsu Cc: Jens Axboe --- Documentation/block/null_blk.txt | 2 +- drivers/block/null_blk.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/block/null_blk.txt b/Documentation/block/null_blk.txt index d8880ca..0365a26 100644 --- a/Documentation/block/null_blk.txt +++ b/Documentation/block/null_blk.txt @@ -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=y to be used. diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index ba6f4a2e..4943ee2 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -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) {} -- 1.8.3.1