]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/os/freebsd/zfs/sys/zfs_vnops.h
Update OpenZFS to 2.0.0-rc3-gbd565f
[FreeBSD/FreeBSD.git] / include / os / freebsd / zfs / sys / zfs_vnops.h
1 /*
2  * Copyright (c) 2020 iXsystems, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24  * SUCH DAMAGE.
25  *
26  * $FreeBSD$
27  */
28
29 #ifndef _SYS_ZFS_VNOPS_H_
30 #define _SYS_ZFS_VNOPS_H_
31 int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset,
32     uint64_t size, struct vm_page **ppa, dmu_tx_t *tx);
33 int dmu_read_pages(objset_t *os, uint64_t object, vm_page_t *ma, int count,
34     int *rbehind, int *rahead, int last_size);
35 extern int zfs_remove(znode_t *dzp, const char *name, cred_t *cr, int flags);
36 extern int zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap,
37     znode_t **zpp, cred_t *cr, int flags, vsecattr_t *vsecp);
38 extern int zfs_rmdir(znode_t *dzp, const char *name, znode_t *cwd,
39     cred_t *cr, int flags);
40 extern int zfs_setattr(znode_t *zp, vattr_t *vap, int flag, cred_t *cr);
41 extern int zfs_rename(znode_t *sdzp, const char *snm, znode_t *tdzp,
42     const char *tnm, cred_t *cr, int flags);
43 extern int zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
44     const char *link, znode_t **zpp, cred_t *cr, int flags);
45 extern int zfs_link(znode_t *tdzp, znode_t *sp,
46     const char *name, cred_t *cr, int flags);
47 extern int zfs_space(znode_t *zp, int cmd, struct flock *bfp, int flag,
48     offset_t offset, cred_t *cr);
49 extern int zfs_create(znode_t *dzp, const char *name, vattr_t *vap, int excl,
50     int mode, znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp);
51 extern int zfs_setsecattr(znode_t *zp, vsecattr_t *vsecp, int flag,
52     cred_t *cr);
53 extern int zfs_write_simple(znode_t *zp, const void *data, size_t len,
54     loff_t pos, size_t *resid);
55
56 #endif