Consolidate zfs_holey and zfs_access

The zfs_holey() and zfs_access() functions can be made common
to both FreeBSD and Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #11125
This commit is contained in:
Matthew Macy
2020-10-31 09:40:08 -07:00
committed by Tony Hutter
parent 073f3c7826
commit a909190683
8 changed files with 112 additions and 188 deletions
+6
View File
@@ -52,6 +52,12 @@
#define F_FREESP 11 /* Free file space */
#if defined(SEEK_HOLE) && defined(SEEK_DATA)
#define F_SEEK_DATA SEEK_DATA
#define F_SEEK_HOLE SEEK_HOLE
#endif
/*
* The vnode AT_ flags are mapped to the Linux ATTR_* flags.
* This allows them to be used safely with an iattr structure.