aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libspl
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-11-21 09:32:57 -0800
committerBrian Behlendorf <[email protected]>2019-11-21 09:32:57 -0800
commitda92d5cbb38cea3a860b8a6bb8ee21f9129e7d7c (patch)
treecc2d84b481a30b43d4097603e79a55a1975b0b64 /lib/libspl
parent67a6c3bc9ff401fa04bc41354c5172b51aaed1c9 (diff)
Add zfs_file_* interface, remove vnodes
Provide a common zfs_file_* interface which can be implemented on all platforms to perform normal file access from either the kernel module or the libzpool library. This allows all non-portable vnode_t usage in the common code to be replaced by the new portable zfs_file_t. The associated vnode and kobj compatibility functions, types, and macros have been removed from the SPL. Moving forward, vnodes should only be used in platform specific code when provided by the native operating system. Reviewed-by: Sean Eric Fagan <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9556
Diffstat (limited to 'lib/libspl')
-rw-r--r--lib/libspl/include/os/linux/sys/Makefile.am1
-rw-r--r--lib/libspl/include/os/linux/sys/file.h49
2 files changed, 0 insertions, 50 deletions
diff --git a/lib/libspl/include/os/linux/sys/Makefile.am b/lib/libspl/include/os/linux/sys/Makefile.am
index 6b170fa8c..f8b6d9fae 100644
--- a/lib/libspl/include/os/linux/sys/Makefile.am
+++ b/lib/libspl/include/os/linux/sys/Makefile.am
@@ -2,7 +2,6 @@ libspldir = $(includedir)/libspl/sys
libspl_HEADERS = \
$(top_srcdir)/lib/libspl/include/os/linux/sys/byteorder.h \
$(top_srcdir)/lib/libspl/include/os/linux/sys/errno.h \
- $(top_srcdir)/lib/libspl/include/os/linux/sys/file.h \
$(top_srcdir)/lib/libspl/include/os/linux/sys/mnttab.h \
$(top_srcdir)/lib/libspl/include/os/linux/sys/mount.h \
$(top_srcdir)/lib/libspl/include/os/linux/sys/param.h \
diff --git a/lib/libspl/include/os/linux/sys/file.h b/lib/libspl/include/os/linux/sys/file.h
deleted file mode 100644
index e0752ac25..000000000
--- a/lib/libspl/include/os/linux/sys/file.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _LIBSPL_SYS_FILE_H
-#define _LIBSPL_SYS_FILE_H
-
-#include_next <sys/file.h>
-
-#include <sys/user.h>
-
-#define FREAD 1
-#define FWRITE 2
-// #define FAPPEND 8
-
-#define FCREAT O_CREAT
-#define FTRUNC O_TRUNC
-#define FOFFMAX O_LARGEFILE
-#define FSYNC O_SYNC
-#define FDSYNC O_DSYNC
-#define FEXCL O_EXCL
-
-#define FNODSYNC 0x10000 /* fsync pseudo flag */
-#define FNOFOLLOW 0x20000 /* don't follow symlinks */
-#define FIGNORECASE 0x80000 /* request case-insensitive lookups */
-
-#endif