1b363d3d5SMatt Macy /*
2b363d3d5SMatt Macy  * CDDL HEADER START
3b363d3d5SMatt Macy  *
4b363d3d5SMatt Macy  * The contents of this file are subject to the terms of the
5b363d3d5SMatt Macy  * Common Development and Distribution License (the "License").
6b363d3d5SMatt Macy  * You may not use this file except in compliance with the License.
7b363d3d5SMatt Macy  *
8b363d3d5SMatt Macy  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9271171e0SMartin Matuska  * or https://opensource.org/licenses/CDDL-1.0.
10b363d3d5SMatt Macy  * See the License for the specific language governing permissions
11b363d3d5SMatt Macy  * and limitations under the License.
12b363d3d5SMatt Macy  *
13b363d3d5SMatt Macy  * When distributing Covered Code, include this CDDL HEADER in each
14b363d3d5SMatt Macy  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15b363d3d5SMatt Macy  * If applicable, add the following below this CDDL HEADER, with the
16b363d3d5SMatt Macy  * fields enclosed by brackets "[]" replaced with your own identifying
17b363d3d5SMatt Macy  * information: Portions Copyright [yyyy] [name of copyright owner]
18b363d3d5SMatt Macy  *
19b363d3d5SMatt Macy  * CDDL HEADER END
20b363d3d5SMatt Macy  */
21b363d3d5SMatt Macy /*
22b363d3d5SMatt Macy  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
23b363d3d5SMatt Macy  */
24b363d3d5SMatt Macy 
25b363d3d5SMatt Macy #ifndef	_SYS_FS_ZFS_VNOPS_OS_H
26b363d3d5SMatt Macy #define	_SYS_FS_ZFS_VNOPS_OS_H
27b363d3d5SMatt Macy 
28b363d3d5SMatt Macy #include <sys/vnode.h>
29b363d3d5SMatt Macy #include <sys/xvattr.h>
30b363d3d5SMatt Macy #include <sys/uio.h>
31b363d3d5SMatt Macy #include <sys/cred.h>
32b363d3d5SMatt Macy #include <sys/fcntl.h>
33b363d3d5SMatt Macy #include <sys/pathname.h>
34b363d3d5SMatt Macy #include <sys/zpl.h>
35b363d3d5SMatt Macy #include <sys/zfs_file.h>
36b363d3d5SMatt Macy 
37b363d3d5SMatt Macy #ifdef	__cplusplus
38b363d3d5SMatt Macy extern "C" {
39b363d3d5SMatt Macy #endif
40b363d3d5SMatt Macy 
41b363d3d5SMatt Macy extern int zfs_open(struct inode *ip, int mode, int flag, cred_t *cr);
42b363d3d5SMatt Macy extern int zfs_close(struct inode *ip, int flag, cred_t *cr);
43b363d3d5SMatt Macy extern int zfs_write_simple(znode_t *zp, const void *data, size_t len,
44b363d3d5SMatt Macy     loff_t pos, size_t *resid);
45b363d3d5SMatt Macy extern int zfs_lookup(znode_t *dzp, char *nm, znode_t **zpp, int flags,
46b363d3d5SMatt Macy     cred_t *cr, int *direntflags, pathname_t *realpnp);
47b363d3d5SMatt Macy extern int zfs_create(znode_t *dzp, char *name, vattr_t *vap, int excl,
48dbd5678dSMartin Matuska     int mode, znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp,
49d411c1d6SMartin Matuska     zidmap_t *mnt_ns);
50b363d3d5SMatt Macy extern int zfs_tmpfile(struct inode *dip, vattr_t *vapzfs, int excl,
51dbd5678dSMartin Matuska     int mode, struct inode **ipp, cred_t *cr, int flag, vsecattr_t *vsecp,
52d411c1d6SMartin Matuska     zidmap_t *mnt_ns);
53b363d3d5SMatt Macy extern int zfs_remove(znode_t *dzp, char *name, cred_t *cr, int flags);
54b363d3d5SMatt Macy extern int zfs_mkdir(znode_t *dzp, char *dirname, vattr_t *vap,
55d411c1d6SMartin Matuska     znode_t **zpp, cred_t *cr, int flags, vsecattr_t *vsecp, zidmap_t *mnt_ns);
56b363d3d5SMatt Macy extern int zfs_rmdir(znode_t *dzp, char *name, znode_t *cwd,
57b363d3d5SMatt Macy     cred_t *cr, int flags);
58b363d3d5SMatt Macy extern int zfs_readdir(struct inode *ip, zpl_dir_context_t *ctx, cred_t *cr);
59abcdc1b9SMartin Matuska #ifdef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK
60abcdc1b9SMartin Matuska extern int zfs_getattr_fast(zidmap_t *, u32 request_mask, struct inode *ip,
61abcdc1b9SMartin Matuska     struct kstat *sp);
62abcdc1b9SMartin Matuska #else
63d411c1d6SMartin Matuska extern int zfs_getattr_fast(zidmap_t *, struct inode *ip, struct kstat *sp);
64abcdc1b9SMartin Matuska #endif
65dbd5678dSMartin Matuska extern int zfs_setattr(znode_t *zp, vattr_t *vap, int flag, cred_t *cr,
66d411c1d6SMartin Matuska     zidmap_t *mnt_ns);
67b363d3d5SMatt Macy extern int zfs_rename(znode_t *sdzp, char *snm, znode_t *tdzp,
68dbd5678dSMartin Matuska     char *tnm, cred_t *cr, int flags, uint64_t rflags, vattr_t *wo_vap,
69d411c1d6SMartin Matuska     zidmap_t *mnt_ns);
70b363d3d5SMatt Macy extern int zfs_symlink(znode_t *dzp, char *name, vattr_t *vap,
71d411c1d6SMartin Matuska     char *link, znode_t **zpp, cred_t *cr, int flags, zidmap_t *mnt_ns);
72184c1b94SMartin Matuska extern int zfs_readlink(struct inode *ip, zfs_uio_t *uio, cred_t *cr);
73b363d3d5SMatt Macy extern int zfs_link(znode_t *tdzp, znode_t *szp,
74b363d3d5SMatt Macy     char *name, cred_t *cr, int flags);
75b363d3d5SMatt Macy extern void zfs_inactive(struct inode *ip);
76b363d3d5SMatt Macy extern int zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag,
77b363d3d5SMatt Macy     offset_t offset, cred_t *cr);
78b363d3d5SMatt Macy extern int zfs_fid(struct inode *ip, fid_t *fidp);
792a58b312SMartin Matuska extern int zfs_getpage(struct inode *ip, struct page *pp);
80b363d3d5SMatt Macy extern int zfs_putpage(struct inode *ip, struct page *pp,
81716fd348SMartin Matuska     struct writeback_control *wbc, boolean_t for_sync);
82b363d3d5SMatt Macy extern int zfs_dirty_inode(struct inode *ip, int flags);
83b363d3d5SMatt Macy extern int zfs_map(struct inode *ip, offset_t off, caddr_t *addrp,
84b363d3d5SMatt Macy     size_t len, unsigned long vm_flags);
85b363d3d5SMatt Macy extern void zfs_zrele_async(znode_t *zp);
86b363d3d5SMatt Macy 
87b363d3d5SMatt Macy #ifdef	__cplusplus
88b363d3d5SMatt Macy }
89b363d3d5SMatt Macy #endif
90b363d3d5SMatt Macy 
91b363d3d5SMatt Macy #endif	/* _SYS_FS_ZFS_VNOPS_H */
92