mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Share zfs_fsync, zfs_read, zfs_write, et al between Linux and FreeBSD
The zfs_fsync, zfs_read, and zfs_write function are almost identical between Linux and FreeBSD. With a little refactoring they can be moved to the common code which is what is done by this commit. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #11078
This commit is contained in:
+14
-13
@@ -101,9 +101,10 @@ SRCS+= nvpair.c \
|
||||
|
||||
#os/freebsd/spl
|
||||
SRCS+= acl_common.c \
|
||||
btree.c \
|
||||
callb.c \
|
||||
list.c \
|
||||
sha256c.c \
|
||||
sha512c.c \
|
||||
spl_acl.c \
|
||||
spl_cmn_err.c \
|
||||
spl_dtrace.c \
|
||||
@@ -111,6 +112,7 @@ SRCS+= acl_common.c \
|
||||
spl_kstat.c \
|
||||
spl_misc.c \
|
||||
spl_policy.c \
|
||||
spl_procfs_list.c \
|
||||
spl_string.c \
|
||||
spl_sunddi.c \
|
||||
spl_sysevent.c \
|
||||
@@ -118,11 +120,8 @@ SRCS+= acl_common.c \
|
||||
spl_uio.c \
|
||||
spl_vfs.c \
|
||||
spl_vm.c \
|
||||
spl_zone.c \
|
||||
sha256c.c \
|
||||
sha512c.c \
|
||||
spl_procfs_list.c \
|
||||
spl_zlib.c
|
||||
spl_zlib.c \
|
||||
spl_zone.c
|
||||
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
|
||||
@@ -132,6 +131,7 @@ SRCS+= spl_atomic.c
|
||||
|
||||
#os/freebsd/zfs
|
||||
SRCS+= abd_os.c \
|
||||
arc_os.c \
|
||||
crypto_os.c \
|
||||
dmu_os.c \
|
||||
hkdf.c \
|
||||
@@ -139,17 +139,16 @@ SRCS+= abd_os.c \
|
||||
spa_os.c \
|
||||
sysctl_os.c \
|
||||
vdev_file.c \
|
||||
vdev_label_os.c \
|
||||
vdev_geom.c \
|
||||
vdev_label_os.c \
|
||||
zfs_acl.c \
|
||||
zfs_ctldir.c \
|
||||
zfs_debug.c \
|
||||
zfs_dir.c \
|
||||
zfs_ioctl_compat.c \
|
||||
zfs_ioctl_os.c \
|
||||
zfs_log.c \
|
||||
zfs_replay.c \
|
||||
zfs_vfsops.c \
|
||||
zfs_vnops.c \
|
||||
zfs_vnops_os.c \
|
||||
zfs_znode.c \
|
||||
zio_crypt.c \
|
||||
zvol_os.c
|
||||
@@ -177,10 +176,10 @@ SRCS+= zfeature_common.c \
|
||||
SRCS+= abd.c \
|
||||
aggsum.c \
|
||||
arc.c \
|
||||
arc_os.c \
|
||||
blkptr.c \
|
||||
bplist.c \
|
||||
bpobj.c \
|
||||
btree.c \
|
||||
cityhash.c \
|
||||
dbuf.c \
|
||||
dbuf_stats.c \
|
||||
@@ -275,16 +274,18 @@ SRCS+= abd.c \
|
||||
zcp_synctask.c \
|
||||
zfeature.c \
|
||||
zfs_byteswap.c \
|
||||
zfs_debug.c \
|
||||
zfs_file_os.c \
|
||||
zfs_fm.c \
|
||||
zfs_fuid.c \
|
||||
zfs_ioctl.c \
|
||||
zfs_log.c \
|
||||
zfs_onexit.c \
|
||||
zfs_quota.c \
|
||||
zfs_ratelimit.c \
|
||||
zfs_replay.c \
|
||||
zfs_rlock.c \
|
||||
zfs_sa.c \
|
||||
zfs_vnops.c \
|
||||
zil.c \
|
||||
zio.c \
|
||||
zio_checksum.c \
|
||||
@@ -322,7 +323,7 @@ CFLAGS.spl_vm.c= -Wno-cast-qual
|
||||
CFLAGS.spl_zlib.c= -Wno-cast-qual
|
||||
CFLAGS.abd.c= -Wno-cast-qual
|
||||
CFLAGS.zfs_log.c= -Wno-cast-qual
|
||||
CFLAGS.zfs_vnops.c= -Wno-pointer-arith
|
||||
CFLAGS.zfs_vnops_os.c= -Wno-pointer-arith
|
||||
CFLAGS.u8_textprep.c= -Wno-cast-qual
|
||||
CFLAGS.zfs_fletcher.c= -Wno-cast-qual -Wno-pointer-arith
|
||||
CFLAGS.zfs_fletcher_intel.c= -Wno-cast-qual -Wno-pointer-arith
|
||||
|
||||
Reference in New Issue
Block a user