From d2782af461c62350abb5abe439b57961c72f9cee Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Sat, 16 May 2020 13:10:38 -0400 Subject: [PATCH] Fix ZVOL_DIR We only use ZVOL_DIR on FreeBSD, and on FreeBSD it isn't correct. Move the definition to the file where it is needed, and define it as /dev/zvol/. Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #10337 --- include/sys/fs/zfs.h | 3 --- module/os/freebsd/zfs/zvol_os.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index 39be630d8b3b..ecdfd42d01a8 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -1153,9 +1153,6 @@ typedef struct ddt_histogram { #define ZFS_SUPER_MAGIC 0x2fc12fc1 -/* general zvol path */ -#define ZVOL_DIR "/dev" - #define ZVOL_MAJOR 230 #define ZVOL_MINOR_BITS 4 #define ZVOL_MINOR_MASK ((1U << ZVOL_MINOR_BITS) - 1) diff --git a/module/os/freebsd/zfs/zvol_os.c b/module/os/freebsd/zfs/zvol_os.c index bef97a9b34ab..caef0b55b371 100644 --- a/module/os/freebsd/zfs/zvol_os.c +++ b/module/os/freebsd/zfs/zvol_os.c @@ -98,6 +98,7 @@ #include "zfs_namecheck.h" +#define ZVOL_DIR "/dev/zvol/" #define ZVOL_DUMPSIZE "dumpsize" #ifdef ZVOL_LOCK_DEBUG