diff mbox series

[1/1] null_blk: describe the usage of fault injection param

Message ID 20200304191644.25220-1-dongli.zhang@oracle.com (mailing list archive)
State New, archived
Headers show
Series [1/1] null_blk: describe the usage of fault injection param | expand

Commit Message

Dongli Zhang March 4, 2020, 7:16 p.m. UTC
As null_blk is a very good start point to test block layer, this patch adds
description and comments to 'timeout' and 'requeue' to explain how to use
fault injection with null_blk.

The nvme has similar with nvme_core.fail_request in the form of comment.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
 drivers/block/null_blk_main.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Jens Axboe March 12, 2020, 1:57 p.m. UTC | #1
On 3/4/20 12:16 PM, Dongli Zhang wrote:
> As null_blk is a very good start point to test block layer, this patch adds
> description and comments to 'timeout' and 'requeue' to explain how to use
> fault injection with null_blk.
> 
> The nvme has similar with nvme_core.fail_request in the form of comment.

This doesn't apply to for-5.7/drivers, care to resend?
Dongli Zhang March 12, 2020, 8:42 p.m. UTC | #2
On 3/12/20 6:57 AM, Jens Axboe wrote:
> On 3/4/20 12:16 PM, Dongli Zhang wrote:
>> As null_blk is a very good start point to test block layer, this patch adds
>> description and comments to 'timeout' and 'requeue' to explain how to use
>> fault injection with null_blk.
>>
>> The nvme has similar with nvme_core.fail_request in the form of comment.
> 
> This doesn't apply to for-5.7/drivers, care to resend?
> 

I would resend based on for-5.7/drivers.

Thank you very much!

Dongli Zhang
diff mbox series

Patch

diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c
index 133060431dbd..1ee5aaacdb0f 100644
--- a/drivers/block/null_blk_main.c
+++ b/drivers/block/null_blk_main.c
@@ -96,11 +96,17 @@  module_param_named(home_node, g_home_node, int, 0444);
 MODULE_PARM_DESC(home_node, "Home node for the device");
 
 #ifdef CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION
+/*
+ * For more details about fault injection, please refer to
+ * Documentation/fault-injection/fault-injection.rst.
+ */
 static char g_timeout_str[80];
 module_param_string(timeout, g_timeout_str, sizeof(g_timeout_str), 0444);
+MODULE_PARM_DESC(timeout, "Fault injection. timeout=<interval>,<probability>,<space>,<times>");
 
 static char g_requeue_str[80];
 module_param_string(requeue, g_requeue_str, sizeof(g_requeue_str), 0444);
+MODULE_PARM_DESC(requeue, "Fault injection. requeue=<interval>,<probability>,<space>,<times>");
 #endif
 
 static int g_queue_mode = NULL_Q_MQ;