mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +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:
@@ -53,4 +53,7 @@ struct opensolaris_utsname {
|
||||
|
||||
extern char hw_serial[11];
|
||||
|
||||
#define task_io_account_read(n)
|
||||
#define task_io_account_write(n)
|
||||
|
||||
#endif /* _OPENSOLARIS_SYS_MISC_H_ */
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <sys/vnode.h>
|
||||
struct mount;
|
||||
struct vattr;
|
||||
struct znode;
|
||||
|
||||
int secpolicy_nfs(cred_t *cr);
|
||||
int secpolicy_zfs(cred_t *crd);
|
||||
@@ -57,7 +58,7 @@ int secpolicy_vnode_setattr(cred_t *cr, vnode_t *vp, struct vattr *vap,
|
||||
int unlocked_access(void *, int, cred_t *), void *node);
|
||||
int secpolicy_vnode_create_gid(cred_t *cr);
|
||||
int secpolicy_vnode_setids_setgids(vnode_t *vp, cred_t *cr, gid_t gid);
|
||||
int secpolicy_vnode_setid_retain(vnode_t *vp, cred_t *cr,
|
||||
int secpolicy_vnode_setid_retain(struct znode *zp, cred_t *cr,
|
||||
boolean_t issuidroot);
|
||||
void secpolicy_setid_clear(struct vattr *vap, vnode_t *vp, cred_t *cr);
|
||||
int secpolicy_setid_setsticky_clear(vnode_t *vp, struct vattr *vap,
|
||||
|
||||
@@ -82,6 +82,7 @@ void uioskip(uio_t *uiop, size_t n);
|
||||
#define uio_iovcnt(uio) (uio)->uio_iovcnt
|
||||
#define uio_iovlen(uio, idx) (uio)->uio_iov[(idx)].iov_len
|
||||
#define uio_iovbase(uio, idx) (uio)->uio_iov[(idx)].iov_base
|
||||
#define uio_fault_disable(uio, set)
|
||||
|
||||
static inline void
|
||||
uio_iov_at_index(uio_t *uio, uint_t idx, void **base, uint64_t *len)
|
||||
|
||||
Reference in New Issue
Block a user