diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h --- a/sys/sys/unistd.h +++ b/sys/sys/unistd.h @@ -216,6 +216,15 @@ #define CLOSE_RANGE_CLOEXEC (1<<2) #define CLOSE_RANGE_CLOFORK (1<<3) +/* + * copy_file_range flags visible to user space. + * High order 8 bits reserved for kernel flags. + * Allocate from bit 23 down, to try and avoid conflicts with + * future Linux flags. + */ +#define COPY_FILE_RANGE_CLONE 0x00800000 /* Require cloning. */ +#define COPY_FILE_RANGE_USERFLAGS (COPY_FILE_RANGE_CLONE) + #endif /* __BSD_VISIBLE */ #endif /* !_SYS_UNISTD_H_ */ diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -397,21 +397,8 @@ */ #define VLKTIMEOUT (hz / 20 + 1) -/* copy_file_range flags */ -#define COPY_FILE_RANGE_KFLAGS 0xff000000 - -/* - * copy_file_range flags visible to user space. - * Allocate high bits first, to try and avoid conflicting with Linux. - */ -#define COPY_FILE_RANGE_CLONE 0x00800000 /* Require cloning. */ -#define COPY_FILE_RANGE_USERFLAGS (COPY_FILE_RANGE_CLONE) - #ifdef _KERNEL -/* copy_file_range flags only usable in the kernel */ -#define COPY_FILE_RANGE_TIMEO1SEC 0x01000000 /* Return after 1sec. */ - #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_VNODE); #endif @@ -634,6 +621,10 @@ #define VN_OPEN_INVFS 0x00000008 #define VN_OPEN_WANTIOCTLCAPS 0x00000010 +/* copy_file_range kernel flags */ +#define COPY_FILE_RANGE_KFLAGS 0xff000000 +#define COPY_FILE_RANGE_TIMEO1SEC 0x01000000 /* Return after 1sec. */ + /* * Public vnode manipulation functions. */