$(top_srcdir)/include/sys/zfs_stat.h \
$(top_srcdir)/include/sys/zfs_vfsops.h \
$(top_srcdir)/include/sys/zfs_znode.h \
+ $(top_srcdir)/include/sys/zfs_vnops.h \
$(top_srcdir)/include/sys/zil.h \
$(top_srcdir)/include/sys/zil_impl.h \
$(top_srcdir)/include/sys/zio_checksum.h \
$(top_srcdir)/include/sys/zfs_stat.h \
$(top_srcdir)/include/sys/zfs_vfsops.h \
$(top_srcdir)/include/sys/zfs_znode.h \
+ $(top_srcdir)/include/sys/zfs_vnops.h \
$(top_srcdir)/include/sys/zil.h \
$(top_srcdir)/include/sys/zil_impl.h \
$(top_srcdir)/include/sys/zio_checksum.h \
$(top_srcdir)/include/sys/zfs_stat.h \
$(top_srcdir)/include/sys/zfs_vfsops.h \
$(top_srcdir)/include/sys/zfs_znode.h \
+ $(top_srcdir)/include/sys/zfs_vnops.h \
$(top_srcdir)/include/sys/zil.h \
$(top_srcdir)/include/sys/zil_impl.h \
$(top_srcdir)/include/sys/zio_checksum.h \
$(top_srcdir)/include/sys/zfs_stat.h \
$(top_srcdir)/include/sys/zfs_vfsops.h \
$(top_srcdir)/include/sys/zfs_znode.h \
+ $(top_srcdir)/include/sys/zfs_vnops.h \
$(top_srcdir)/include/sys/zil.h \
$(top_srcdir)/include/sys/zil_impl.h \
$(top_srcdir)/include/sys/zio_checksum.h \
extern void zfsvfs_free(zfsvfs_t *zfsvfs);
extern int zfs_check_global_label(const char *dsname, const char *hexsl);
+extern int zfs_register_callbacks(vfs_t *vfsp);
+extern void zfs_unregister_callbacks(zfsvfs_t *zfsvfs);
+extern int zfs_domount(vfs_t *vfsp, char *osname);
+extern int zfs_umount(vfs_t *vfsp, int fflag, cred_t *cr);
+extern int zfs_root(vfs_t *vfsp, vnode_t **vpp);
+extern int zfs_statvfs(vfs_t *vfsp, struct statvfs64 *statp);
+extern int zfs_vget(vfs_t *vfsp, vnode_t **vpp, fid_t *fidp);
+
#ifdef __cplusplus
}
#endif
--- /dev/null
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ */
+
+#ifndef _SYS_FS_ZFS_VNOPS_H
+#define _SYS_FS_ZFS_VNOPS_H
+
+#include <sys/vnode.h>
+#include <sys/uio.h>
+#include <sys/cred.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int zfs_read(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr,
+ caller_context_t *ct);
+extern int zfs_write(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr,
+ caller_context_t *ct);
+extern int zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp,
+ struct pathname *pnp, int flags, vnode_t *rdir, cred_t *cr,
+ caller_context_t *ct, int *direntflags, pathname_t *realpnp);
+extern int zfs_create(vnode_t *dvp, char *name, vattr_t *vap,
+ int excl, int mode, vnode_t **vpp, cred_t *cr, int flag,
+ caller_context_t *ct, vsecattr_t *vsecp);
+extern int zfs_remove(vnode_t *dvp, char *name, cred_t *cr,
+ caller_context_t *ct, int flags);
+extern int zfs_mkdir(vnode_t *dvp, char *dirname, vattr_t *vap,
+ vnode_t **vpp, cred_t *cr, caller_context_t *ct, int flags,
+ vsecattr_t *vsecp);
+extern int zfs_rmdir(vnode_t *dvp, char *name, vnode_t *cwd, cred_t *cr,
+ caller_context_t *ct, int flags);
+extern int zfs_fsync(vnode_t *vp, int syncflag, cred_t *cr,
+ caller_context_t *ct);
+extern int zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr,
+ caller_context_t *ct);
+extern int zfs_setattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr,
+ caller_context_t *ct);
+extern int zfs_rename(vnode_t *sdvp, char *snm, vnode_t *tdvp, char *tnm,
+ cred_t *cr, caller_context_t *ct, int flags);
+extern int zfs_symlink(vnode_t *dvp, char *name, vattr_t *vap, char *link,
+ cred_t *cr, caller_context_t *ct, int flags);
+extern int zfs_readlink(vnode_t *vp, uio_t *uio, cred_t *cr,
+ caller_context_t *ct);
+extern int zfs_link(vnode_t *tdvp, vnode_t *svp, char *name, cred_t *cr,
+ caller_context_t *ct, int flags);
+extern void zfs_inactive(vnode_t *vp, cred_t *cr, caller_context_t *ct);
+extern int zfs_space(vnode_t *vp, int cmd, flock64_t *bfp, int flag,
+ offset_t offset, cred_t *cr, caller_context_t *ct);
+extern int zfs_fid(vnode_t *vp, fid_t *fidp, caller_context_t *ct);
+extern int zfs_getsecattr(vnode_t *vp, vsecattr_t *vsecp, int flag,
+ cred_t *cr, caller_context_t *ct);
+extern int zfs_setsecattr(vnode_t *vp, vsecattr_t *vsecp, int flag,
+ cred_t *cr, caller_context_t *ct);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYS_FS_ZFS_VNOPS_H */
extern int sys_shutdown;
static int zfs_mount(vfs_t *vfsp, vnode_t *mvp, struct mounta *uap, cred_t *cr);
-static int zfs_umount(vfs_t *vfsp, int fflag, cred_t *cr);
static int zfs_mountroot(vfs_t *vfsp, enum whymountroot);
-static int zfs_root(vfs_t *vfsp, vnode_t **vpp);
-static int zfs_statvfs(vfs_t *vfsp, struct statvfs64 *statp);
-static int zfs_vget(vfs_t *vfsp, vnode_t **vpp, fid_t *fidp);
static void zfs_freevfs(vfs_t *vfsp);
static const fs_operation_def_t zfs_vfsops_template[] = {
return (0);
}
+EXPORT_SYMBOL(zfs_sync);
static int
zfs_create_unique_device(dev_t *dev)
zfsvfs->z_acl_inherit = newval;
}
-static int
+int
zfs_register_callbacks(vfs_t *vfsp)
{
struct dsl_dataset *ds = NULL;
return (error);
}
+EXPORT_SYMBOL(zfs_register_callbacks);
#endif /* HAVE_ZPL */
static int
zap_cursor_fini(&zc);
return (error);
}
+EXPORT_SYMBOL(zfs_userspace_many);
/*
* buf must be big enough (eg, 32 bytes)
err = 0;
return (err);
}
+EXPORT_SYMBOL(zfs_userspace_one);
int
zfs_set_userquota(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type,
dmu_tx_commit(tx);
return (err);
}
+EXPORT_SYMBOL(zfs_set_userquota);
boolean_t
zfs_fuid_overquota(zfsvfs_t *zfsvfs, boolean_t isgroup, uint64_t fuid)
return (B_FALSE);
return (used >= quota);
}
+EXPORT_SYMBOL(zfs_fuid_overquota);
boolean_t
zfs_owner_overquota(zfsvfs_t *zfsvfs, znode_t *zp, boolean_t isgroup)
return (zfs_fuid_overquota(zfsvfs, isgroup, fuid));
}
+EXPORT_SYMBOL(zfs_owner_overquota);
int
zfsvfs_create(const char *osname, zfsvfs_t **zfvp)
zfsvfs->z_use_sa = USE_SA(zfsvfs->z_version, zfsvfs->z_os);
}
-static int
+int
zfs_domount(vfs_t *vfsp, char *osname)
{
dev_t mount_dev;
return (error);
}
+EXPORT_SYMBOL(zfs_domount);
void
zfs_unregister_callbacks(zfsvfs_t *zfsvfs)
vscan_changed_cb, zfsvfs) == 0);
}
}
+EXPORT_SYMBOL(zfs_unregister_callbacks);
/*
* Convert a decimal digit string to a uint64_t integer.
return (error);
}
-static int
+int
zfs_statvfs(vfs_t *vfsp, struct statvfs64 *statp)
{
zfsvfs_t *zfsvfs = vfsp->vfs_data;
ZFS_EXIT(zfsvfs);
return (0);
}
+EXPORT_SYMBOL(zfs_statvfs);
-static int
+int
zfs_root(vfs_t *vfsp, vnode_t **vpp)
{
zfsvfs_t *zfsvfs = vfsp->vfs_data;
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_root);
/*
* Teardown the zfsvfs::z_os.
}
/*ARGSUSED*/
-static int
+int
zfs_umount(vfs_t *vfsp, int fflag, cred_t *cr)
{
zfsvfs_t *zfsvfs = vfsp->vfs_data;
return (0);
}
+EXPORT_SYMBOL(zfs_umount);
-static int
+int
zfs_vget(vfs_t *vfsp, vnode_t **vpp, fid_t *fidp)
{
zfsvfs_t *zfsvfs = vfsp->vfs_data;
ZFS_EXIT(zfsvfs);
return (0);
}
+EXPORT_SYMBOL(zfs_vget);
/*
* Block out VOPs and close zfsvfs_t::z_os
return (0);
}
+EXPORT_SYMBOL(zfs_suspend_fs);
/*
* Reopen zfsvfs_t::z_os and release VOPs.
}
return (err);
}
+EXPORT_SYMBOL(zfs_resume_fs);
static void
zfs_freevfs(vfs_t *vfsp)
return (0);
}
+EXPORT_SYMBOL(zfs_set_version);
#endif /* HAVE_ZPL */
/*
#include <sys/zfs_ctldir.h>
#include <sys/zfs_fuid.h>
#include <sys/zfs_sa.h>
+#include <sys/zfs_vnops.h>
#include <sys/dnlc.h>
#include <sys/zfs_rlock.h>
#include <sys/extdirent.h>
* vp - atime updated if byte count > 0
*/
/* ARGSUSED */
-static int
+int
zfs_read(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct)
{
znode_t *zp = VTOZ(vp);
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_read);
/*
* Write the bytes to a file.
*/
/* ARGSUSED */
-static int
+int
zfs_write(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct)
{
znode_t *zp = VTOZ(vp);
ZFS_EXIT(zfsvfs);
return (0);
}
+EXPORT_SYMBOL(zfs_write);
void
zfs_get_done(zgd_t *zgd, int error)
* NA
*/
/* ARGSUSED */
-static int
+int
zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct pathname *pnp,
int flags, vnode_t *rdir, cred_t *cr, caller_context_t *ct,
int *direntflags, pathname_t *realpnp)
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_lookup);
/*
* Attempt to create a new entry in a directory. If the entry
*/
/* ARGSUSED */
-static int
-zfs_create(vnode_t *dvp, char *name, vattr_t *vap, vcexcl_t excl,
+int
+zfs_create(vnode_t *dvp, char *name, vattr_t *vap, int excl,
int mode, vnode_t **vpp, cred_t *cr, int flag, caller_context_t *ct,
vsecattr_t *vsecp)
{
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_create);
/*
* Remove an entry from a directory.
uint64_t null_xattr = 0;
/*ARGSUSED*/
-static int
+int
zfs_remove(vnode_t *dvp, char *name, cred_t *cr, caller_context_t *ct,
int flags)
{
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_remove);
/*
* Create a new directory and insert it into dvp using the name
* vp - ctime|mtime|atime updated
*/
/*ARGSUSED*/
-static int
+int
zfs_mkdir(vnode_t *dvp, char *dirname, vattr_t *vap, vnode_t **vpp, cred_t *cr,
caller_context_t *ct, int flags, vsecattr_t *vsecp)
{
ZFS_EXIT(zfsvfs);
return (0);
}
+EXPORT_SYMBOL(zfs_mkdir);
/*
* Remove a directory subdir entry. If the current working
* dvp - ctime|mtime updated
*/
/*ARGSUSED*/
-static int
+int
zfs_rmdir(vnode_t *dvp, char *name, vnode_t *cwd, cred_t *cr,
caller_context_t *ct, int flags)
{
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_rmdir);
/*
* Read as many directory entries as will fit into the provided
ulong_t zfs_fsync_sync_cnt = 4;
-static int
+int
zfs_fsync(vnode_t *vp, int syncflag, cred_t *cr, caller_context_t *ct)
{
znode_t *zp = VTOZ(vp);
}
return (0);
}
+EXPORT_SYMBOL(zfs_fsync);
/*
* RETURN: 0 (always succeeds)
*/
/* ARGSUSED */
-static int
+int
zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr,
caller_context_t *ct)
{
ZFS_EXIT(zfsvfs);
return (0);
}
+EXPORT_SYMBOL(zfs_getattr);
/*
* Set the file attributes to the values contained in the
* vp - ctime updated, mtime updated if size changed.
*/
/* ARGSUSED */
-static int
+int
zfs_setattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr,
caller_context_t *ct)
{
ZFS_EXIT(zfsvfs);
return (err);
}
+EXPORT_SYMBOL(zfs_setattr);
typedef struct zfs_zlock {
krwlock_t *zl_rwlock; /* lock we acquired */
* sdvp,tdvp - ctime|mtime updated
*/
/*ARGSUSED*/
-static int
+int
zfs_rename(vnode_t *sdvp, char *snm, vnode_t *tdvp, char *tnm, cred_t *cr,
caller_context_t *ct, int flags)
{
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_rename);
/*
* Insert the indicated symbolic reference entry into the directory.
* dvp - ctime|mtime updated
*/
/*ARGSUSED*/
-static int
+int
zfs_symlink(vnode_t *dvp, char *name, vattr_t *vap, char *link, cred_t *cr,
caller_context_t *ct, int flags)
{
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_symlink);
/*
* Return, in the buffer contained in the provided uio structure,
* vp - atime updated
*/
/* ARGSUSED */
-static int
+int
zfs_readlink(vnode_t *vp, uio_t *uio, cred_t *cr, caller_context_t *ct)
{
znode_t *zp = VTOZ(vp);
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_readlink);
/*
* Insert a new entry into directory tdvp referencing svp.
* svp - ctime updated
*/
/* ARGSUSED */
-static int
+int
zfs_link(vnode_t *tdvp, vnode_t *svp, char *name, cred_t *cr,
caller_context_t *ct, int flags)
{
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_link);
/*
* zfs_null_putapage() is used when the file system has been force
zfs_zinactive(zp);
rw_exit(&zfsvfs->z_teardown_inactive_lock);
}
+EXPORT_SYMBOL(zfs_inactive);
/*
* Bounds-check the seek operation.
* vp - ctime|mtime updated
*/
/* ARGSUSED */
-static int
+int
zfs_space(vnode_t *vp, int cmd, flock64_t *bfp, int flag,
offset_t offset, cred_t *cr, caller_context_t *ct)
{
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_space);
/*ARGSUSED*/
-static int
+int
zfs_fid(vnode_t *vp, fid_t *fidp, caller_context_t *ct)
{
znode_t *zp = VTOZ(vp);
ZFS_EXIT(zfsvfs);
return (0);
}
+EXPORT_SYMBOL(zfs_fid);
static int
zfs_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr,
}
/*ARGSUSED*/
-static int
+int
zfs_getsecattr(vnode_t *vp, vsecattr_t *vsecp, int flag, cred_t *cr,
caller_context_t *ct)
{
return (error);
}
+EXPORT_SYMBOL(zfs_getsecattr);
/*ARGSUSED*/
-static int
+int
zfs_setsecattr(vnode_t *vp, vsecattr_t *vsecp, int flag, cred_t *cr,
caller_context_t *ct)
{
ZFS_EXIT(zfsvfs);
return (error);
}
+EXPORT_SYMBOL(zfs_setsecattr);
/*
* Tunable, both must be a power of 2.