xref: /freebsd-src/sys/contrib/openzfs/include/sys/zfs_vnops.h (revision a4e5e0106ac7145f56eb39a691e302cabb4635be)
17877fdebSMatt Macy /*
27877fdebSMatt Macy  * CDDL HEADER START
37877fdebSMatt Macy  *
47877fdebSMatt Macy  * The contents of this file are subject to the terms of the
57877fdebSMatt Macy  * Common Development and Distribution License (the "License").
67877fdebSMatt Macy  * You may not use this file except in compliance with the License.
77877fdebSMatt Macy  *
87877fdebSMatt Macy  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9271171e0SMartin Matuska  * or https://opensource.org/licenses/CDDL-1.0.
107877fdebSMatt Macy  * See the License for the specific language governing permissions
117877fdebSMatt Macy  * and limitations under the License.
127877fdebSMatt Macy  *
137877fdebSMatt Macy  * When distributing Covered Code, include this CDDL HEADER in each
147877fdebSMatt Macy  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157877fdebSMatt Macy  * If applicable, add the following below this CDDL HEADER, with the
167877fdebSMatt Macy  * fields enclosed by brackets "[]" replaced with your own identifying
177877fdebSMatt Macy  * information: Portions Copyright [yyyy] [name of copyright owner]
187877fdebSMatt Macy  *
197877fdebSMatt Macy  * CDDL HEADER END
207877fdebSMatt Macy  */
217877fdebSMatt Macy /*
227877fdebSMatt Macy  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
237877fdebSMatt Macy  */
247877fdebSMatt Macy 
257877fdebSMatt Macy #ifndef	_SYS_FS_ZFS_VNOPS_H
267877fdebSMatt Macy #define	_SYS_FS_ZFS_VNOPS_H
27*a4e5e010SMartin Matuska 
287877fdebSMatt Macy #include <sys/zfs_vnops_os.h>
297877fdebSMatt Macy 
30*a4e5e010SMartin Matuska extern int zfs_bclone_enabled;
31*a4e5e010SMartin Matuska 
327877fdebSMatt Macy extern int zfs_fsync(znode_t *, int, cred_t *);
33184c1b94SMartin Matuska extern int zfs_read(znode_t *, zfs_uio_t *, int, cred_t *);
34184c1b94SMartin Matuska extern int zfs_write(znode_t *, zfs_uio_t *, int, cred_t *);
357877fdebSMatt Macy extern int zfs_holey(znode_t *, ulong_t, loff_t *);
367877fdebSMatt Macy extern int zfs_access(znode_t *, int, int, cred_t *);
372a58b312SMartin Matuska extern int zfs_clone_range(znode_t *, uint64_t *, znode_t *, uint64_t *,
382a58b312SMartin Matuska     uint64_t *, cred_t *);
392a58b312SMartin Matuska extern int zfs_clone_range_replay(znode_t *, uint64_t, uint64_t, uint64_t,
402a58b312SMartin Matuska     const blkptr_t *, size_t);
417877fdebSMatt Macy 
427877fdebSMatt Macy extern int zfs_getsecattr(znode_t *, vsecattr_t *, int, cred_t *);
437877fdebSMatt Macy extern int zfs_setsecattr(znode_t *, vsecattr_t *, int, cred_t *);
447877fdebSMatt Macy 
45184c1b94SMartin Matuska extern int mappedread(znode_t *, int, zfs_uio_t *);
46184c1b94SMartin Matuska extern int mappedread_sf(znode_t *, int, zfs_uio_t *);
477877fdebSMatt Macy extern void update_pages(znode_t *, int64_t, int, objset_t *);
487877fdebSMatt Macy 
497877fdebSMatt Macy /*
507877fdebSMatt Macy  * Platform code that asynchronously drops zp's inode / vnode_t.
517877fdebSMatt Macy  *
527877fdebSMatt Macy  * Asynchronous dropping ensures that the caller will never drop the
537877fdebSMatt Macy  * last reference on an inode / vnode_t in the current context.
547877fdebSMatt Macy  * Doing so while holding open a tx could result in a deadlock if
557877fdebSMatt Macy  * the platform calls into filesystem again in the implementation
567877fdebSMatt Macy  * of inode / vnode_t dropping (e.g. call from iput_final()).
577877fdebSMatt Macy  */
587877fdebSMatt Macy extern void zfs_zrele_async(znode_t *zp);
597877fdebSMatt Macy 
607877fdebSMatt Macy extern zil_get_data_t zfs_get_data;
617877fdebSMatt Macy 
627877fdebSMatt Macy #endif
63