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 <behlendorf1@llnl.gov>
Signed-off-by: Ping Huang <huangping@smartx.com>
Closes #13270
This commit is contained in:
hpingfs 2022-03-31 06:39:55 +08:00 committed by GitHub
parent 7dc782e5c5
commit abdcef47d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -46,7 +46,10 @@ static unsigned int zvol_request_sync = 0;
static unsigned int zvol_prefetch_bytes = (128 * 1024); static unsigned int zvol_prefetch_bytes = (128 * 1024);
static unsigned long zvol_max_discard_blocks = 16384; static unsigned long zvol_max_discard_blocks = 16384;
static unsigned int zvol_threads = 32; static unsigned int zvol_threads = 32;
#ifndef HAVE_BLKDEV_GET_ERESTARTSYS
static const unsigned int zvol_open_timeout_ms = 1000; static const unsigned int zvol_open_timeout_ms = 1000;
#endif
struct zvol_state_os { struct zvol_state_os {
struct gendisk *zvo_disk; /* generic disk */ struct gendisk *zvo_disk; /* generic disk */