aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpingfs <[email protected]>2022-03-31 06:39:55 +0800
committerGitHub <[email protected]>2022-03-30 15:39:55 -0700
commitabdcef47d2ef9f38092bcfd3e4a8ec5499244826 (patch)
tree893f09399a29e77b055537d6d70d5c1f8f0a1fad
parent7dc782e5c557cb0bbcd509cc92c22a3b5bf4c500 (diff)
zvol_os: suppress compiler warning for zvol_open_timeout_ms
When HAVE_BLKDEV_GET_ERESTARTSYS is defined, compiler will complain "defined but not used" warning for zvol_open_timeout_ms. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ping Huang <[email protected]> Closes #13270
-rw-r--r--module/os/linux/zfs/zvol_os.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c
index c964cce0d..d30f01f4b 100644
--- a/module/os/linux/zfs/zvol_os.c
+++ b/module/os/linux/zfs/zvol_os.c
@@ -46,7 +46,10 @@ static unsigned int zvol_request_sync = 0;
static unsigned int zvol_prefetch_bytes = (128 * 1024);
static unsigned long zvol_max_discard_blocks = 16384;
static unsigned int zvol_threads = 32;
+
+#ifndef HAVE_BLKDEV_GET_ERESTARTSYS
static const unsigned int zvol_open_timeout_ms = 1000;
+#endif
struct zvol_state_os {
struct gendisk *zvo_disk; /* generic disk */