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_FS_ZFS_VNOPS_OS_H 30 #define _SYS_FS_ZFS_VNOPS_OS_H 31 32 int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset, 33 uint64_t size, struct vm_page **ppa, dmu_tx_t *tx); 34 int dmu_read_pages(objset_t *os, uint64_t object, vm_page_t *ma, int count, 35 int *rbehind, int *rahead, int last_size); 36 extern int zfs_remove(znode_t *dzp, const char *name, cred_t *cr, int flags); 37 extern int zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap, 38 znode_t **zpp, cred_t *cr, int flags, vsecattr_t *vsecp, zuserns_t *mnt_ns); 39 extern int zfs_rmdir(znode_t *dzp, const char *name, znode_t *cwd, 40 cred_t *cr, int flags); 41 extern int zfs_setattr(znode_t *zp, vattr_t *vap, int flag, cred_t *cr, 42 zuserns_t *mnt_ns); 43 extern int zfs_rename(znode_t *sdzp, const char *snm, znode_t *tdzp, 44 const char *tnm, cred_t *cr, int flags, uint64_t rflags, vattr_t *wo_vap, 45 zuserns_t *mnt_ns); 46 extern int zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap, 47 const char *link, znode_t **zpp, cred_t *cr, int flags, zuserns_t *mnt_ns); 48 extern int zfs_link(znode_t *tdzp, znode_t *sp, 49 const char *name, cred_t *cr, int flags); 50 extern int zfs_space(znode_t *zp, int cmd, struct flock *bfp, int flag, 51 offset_t offset, cred_t *cr); 52 extern int zfs_create(znode_t *dzp, const char *name, vattr_t *vap, int excl, 53 int mode, znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp, 54 zuserns_t *mnt_ns); 55 extern int zfs_setsecattr(znode_t *zp, vsecattr_t *vsecp, int flag, 56 cred_t *cr); 57 extern int zfs_write_simple(znode_t *zp, const void *data, size_t len, 58 loff_t pos, size_t *resid); 59 60 #endif 61