Skip to content

Commit

Permalink
Enable tuning of ZVOL open timeout value
Browse files Browse the repository at this point in the history
The default timeout for ZVOL opens may not be sufficient for all cases,
so we should enable the value to be more easily tuned to account for
systems where the default value is insufficient.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Signed-off-by: Prakash Surya <[email protected]>
Closes #15023
  • Loading branch information
Prakash Surya authored Jun 30, 2023
1 parent ac8ae18 commit 945e39f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion module/os/linux/zfs/zvol_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static unsigned int zvol_prefetch_bytes = (128 * 1024);
static unsigned long zvol_max_discard_blocks = 16384;

#ifndef HAVE_BLKDEV_GET_ERESTARTSYS
static const unsigned int zvol_open_timeout_ms = 1000;
static unsigned int zvol_open_timeout_ms = 1000;
#endif

static unsigned int zvol_threads = 0;
Expand Down Expand Up @@ -1612,4 +1612,9 @@ MODULE_PARM_DESC(zvol_blk_mq_blocks_per_thread,
"Process volblocksize blocks per thread");
#endif

#ifndef HAVE_BLKDEV_GET_ERESTARTSYS
module_param(zvol_open_timeout_ms, uint, 0644);
MODULE_PARM_DESC(zvol_open_timeout_ms, "Timeout for ZVOL open retries");
#endif

/* END CSTYLED */

0 comments on commit 945e39f

Please sign in to comment.