diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2020-10-17 01:06:04 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2020-10-17 01:06:04 +0000 |
commit | 180f822596ecc49d3074dcc9dfea9628aae1d48d (patch) | |
tree | d9d18edc1bc35a2f11fd39f178451964c74b08f7 /sys/contrib/openzfs/module/os/linux | |
parent | e7e2d659af5dca29378325d360be41903445933a (diff) | |
parent | 0be360124f8f108f73365e31448e7550f877f3ac (diff) | |
download | src-180f822596ecc49d3074dcc9dfea9628aae1d48d.tar.gz src-180f822596ecc49d3074dcc9dfea9628aae1d48d.zip |
Notes
Diffstat (limited to 'sys/contrib/openzfs/module/os/linux')
21 files changed, 25 insertions, 37 deletions
diff --git a/sys/contrib/openzfs/module/os/linux/spl/README.md b/sys/contrib/openzfs/module/os/linux/spl/README.md index 51166425f063..906530bcf2ad 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/README.md +++ b/sys/contrib/openzfs/module/os/linux/spl/README.md @@ -1,5 +1,5 @@ The Solaris Porting Layer, SPL, is a Linux kernel module which provides a -compatibility layer used by the [ZFS on Linux](https://zfsonlinux.org) project. +compatibility layer used by the [OpenZFS](https://github.com/openzfs/zfs) project. # Installation diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-atomic.c b/sys/contrib/openzfs/module/os/linux/spl/spl-atomic.c index 47ed1886e157..accf656fbcc6 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-atomic.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-atomic.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-condvar.c b/sys/contrib/openzfs/module/os/linux/spl/spl-condvar.c index 49f48664503a..d0461a9f1298 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-condvar.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-condvar.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-cred.c b/sys/contrib/openzfs/module/os/linux/spl/spl-cred.c index 6e93a32e60d7..8fe1cc30ba99 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-cred.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-cred.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-err.c b/sys/contrib/openzfs/module/os/linux/spl/spl-err.c index 3c0bb71c0629..10b768d57360 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-err.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-err.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-generic.c b/sys/contrib/openzfs/module/os/linux/spl/spl-generic.c index 820fb86c3c7d..1da7618185ec 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-generic.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-generic.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-kmem-cache.c b/sys/contrib/openzfs/module/os/linux/spl/spl-kmem-cache.c index 15dc27624c55..6b3d559ffc1c 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-kmem-cache.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-kmem-cache.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c b/sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c index f19421cfcc03..943966cbb17a 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -217,7 +216,7 @@ spl_kmem_alloc_impl(size_t size, int flags, int node) !(flags & KM_VMEM)) { printk(KERN_WARNING "Large kmem_alloc(%lu, 0x%x), please file an issue at:\n" - "https://github.com/zfsonlinux/zfs/issues/new\n", + "https://github.com/openzfs/zfs/issues/new\n", (unsigned long)size, flags); dump_stack(); } diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-kstat.c b/sys/contrib/openzfs/module/os/linux/spl/spl-kstat.c index b9eeb332ee57..dbbf72c8569d 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-kstat.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-kstat.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c b/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c index 6936db5d6466..3e58598d43f8 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-taskq.c b/sys/contrib/openzfs/module/os/linux/spl/spl-taskq.c index 9cbf3e38137c..fafadffc751c 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-taskq.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-taskq.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-thread.c b/sys/contrib/openzfs/module/os/linux/spl/spl-thread.c index 0352a31ea835..db23fb64a298 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-thread.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-thread.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-tsd.c b/sys/contrib/openzfs/module/os/linux/spl/spl-tsd.c index b955ed65470f..546db9ab8bd7 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-tsd.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-tsd.c @@ -5,7 +5,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-vmem.c b/sys/contrib/openzfs/module/os/linux/spl/spl-vmem.c index 32372e6f2b60..cab3e9549cfe 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-vmem.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-vmem.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-xdr.c b/sys/contrib/openzfs/module/os/linux/spl/spl-xdr.c index 1dd31ffc1483..5e763c25606f 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-xdr.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-xdr.c @@ -3,7 +3,6 @@ * Written by Ricardo Correia <Ricardo.M.Correia@Sun.COM> * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-zlib.c b/sys/contrib/openzfs/module/os/linux/spl/spl-zlib.c index db05e28925b5..589496da0c78 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-zlib.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-zlib.c @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_acl.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_acl.c index 11b5559321ad..2628325c0ba9 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_acl.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_acl.c @@ -2666,7 +2666,7 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr) /* * Translate traditional unix S_IRUSR/S_IWUSR/S_IXUSR mode into - * native ACL format and call zfs_zaccess() + * NFSv4-style ZFS ACL format and call zfs_zaccess() */ int zfs_zaccess_rwx(znode_t *zp, mode_t mode, int flags, cred_t *cr) diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c index 26e785a0d422..c13a9771235d 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c @@ -131,7 +131,7 @@ static void zfsctl_snapshot_unmount_delay_impl(zfs_snapentry_t *se, int delay); * the snapshot name and provided mount point. No reference is taken. */ static zfs_snapentry_t * -zfsctl_snapshot_alloc(char *full_name, char *full_path, spa_t *spa, +zfsctl_snapshot_alloc(const char *full_name, const char *full_path, spa_t *spa, uint64_t objsetid, struct dentry *root_dentry) { zfs_snapentry_t *se; @@ -261,13 +261,13 @@ snapentry_compare_by_objsetid(const void *a, const void *b) * NULL will be returned. */ static zfs_snapentry_t * -zfsctl_snapshot_find_by_name(char *snapname) +zfsctl_snapshot_find_by_name(const char *snapname) { zfs_snapentry_t *se, search; ASSERT(RW_LOCK_HELD(&zfs_snapshot_lock)); - search.se_name = snapname; + search.se_name = (char *)snapname; se = avl_find(&zfs_snapshots_by_name, &search, NULL); if (se) zfsctl_snapshot_hold(se); @@ -301,7 +301,7 @@ zfsctl_snapshot_find_by_objsetid(spa_t *spa, uint64_t objsetid) * removed, renamed, and added back to the new correct location in the tree. */ static int -zfsctl_snapshot_rename(char *old_snapname, char *new_snapname) +zfsctl_snapshot_rename(const char *old_snapname, const char *new_snapname) { zfs_snapentry_t *se; @@ -410,7 +410,7 @@ zfsctl_snapshot_unmount_delay(spa_t *spa, uint64_t objsetid, int delay) * and zero when unmounted. */ static boolean_t -zfsctl_snapshot_ismounted(char *snapname) +zfsctl_snapshot_ismounted(const char *snapname) { zfs_snapentry_t *se; boolean_t ismounted = B_FALSE; @@ -751,7 +751,7 @@ out: * Special case the handling of "..". */ int -zfsctl_root_lookup(struct inode *dip, char *name, struct inode **ipp, +zfsctl_root_lookup(struct inode *dip, const char *name, struct inode **ipp, int flags, cred_t *cr, int *direntflags, pathname_t *realpnp) { zfsvfs_t *zfsvfs = ITOZSB(dip); @@ -784,7 +784,7 @@ zfsctl_root_lookup(struct inode *dip, char *name, struct inode **ipp, * snapshot if it exist, creating the pseudo filesystem inode as necessary. */ int -zfsctl_snapdir_lookup(struct inode *dip, char *name, struct inode **ipp, +zfsctl_snapdir_lookup(struct inode *dip, const char *name, struct inode **ipp, int flags, cred_t *cr, int *direntflags, pathname_t *realpnp) { zfsvfs_t *zfsvfs = ITOZSB(dip); @@ -815,8 +815,8 @@ zfsctl_snapdir_lookup(struct inode *dip, char *name, struct inode **ipp, * to the '.zfs/snapshot' directory snapshots cannot be moved elsewhere. */ int -zfsctl_snapdir_rename(struct inode *sdip, char *snm, - struct inode *tdip, char *tnm, cred_t *cr, int flags) +zfsctl_snapdir_rename(struct inode *sdip, const char *snm, + struct inode *tdip, const char *tnm, cred_t *cr, int flags) { zfsvfs_t *zfsvfs = ITOZSB(sdip); char *to, *from, *real, *fsname; @@ -893,7 +893,8 @@ out: * the removal of the snapshot with the given name. */ int -zfsctl_snapdir_remove(struct inode *dip, char *name, cred_t *cr, int flags) +zfsctl_snapdir_remove(struct inode *dip, const char *name, cred_t *cr, + int flags) { zfsvfs_t *zfsvfs = ITOZSB(dip); char *snapname, *real; @@ -941,7 +942,7 @@ out: * the creation of a new snapshot with the given name. */ int -zfsctl_snapdir_mkdir(struct inode *dip, char *dirname, vattr_t *vap, +zfsctl_snapdir_mkdir(struct inode *dip, const char *dirname, vattr_t *vap, struct inode **ipp, cred_t *cr, int flags) { zfsvfs_t *zfsvfs = ITOZSB(dip); @@ -1001,7 +1002,7 @@ exportfs_flush(void) * it's in use, the unmount will fail harmlessly. */ int -zfsctl_snapshot_unmount(char *snapname, int flags) +zfsctl_snapshot_unmount(const char *snapname, int flags) { char *argv[] = { "/usr/bin/env", "umount", "-t", "zfs", "-n", NULL, NULL }; diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_dir.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_dir.c index 383657208df3..207a51d75bc9 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_dir.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_dir.c @@ -60,8 +60,9 @@ * of names after deciding which is the appropriate lookup interface. */ static int -zfs_match_find(zfsvfs_t *zfsvfs, znode_t *dzp, char *name, matchtype_t mt, - boolean_t update, int *deflags, pathname_t *rpnp, uint64_t *zoid) +zfs_match_find(zfsvfs_t *zfsvfs, znode_t *dzp, const char *name, + matchtype_t mt, boolean_t update, int *deflags, pathname_t *rpnp, + uint64_t *zoid) { boolean_t conflict = B_FALSE; int error; @@ -139,8 +140,8 @@ zfs_match_find(zfsvfs_t *zfsvfs, znode_t *dzp, char *name, matchtype_t mt, * but return znode pointers to a single match. */ int -zfs_dirent_lock(zfs_dirlock_t **dlpp, znode_t *dzp, char *name, znode_t **zpp, - int flag, int *direntflags, pathname_t *realpnp) +zfs_dirent_lock(zfs_dirlock_t **dlpp, znode_t *dzp, char *name, + znode_t **zpp, int flag, int *direntflags, pathname_t *realpnp) { zfsvfs_t *zfsvfs = ZTOZSB(dzp); zfs_dirlock_t *dl; diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c index 15ec7b91b001..b218237d07ff 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c @@ -352,6 +352,7 @@ acltype_changed_cb(void *arg, uint64_t newval) zfsvfs_t *zfsvfs = arg; switch (newval) { + case ZFS_ACLTYPE_NFSV4: case ZFS_ACLTYPE_OFF: zfsvfs->z_acl_type = ZFS_ACLTYPE_OFF; zfsvfs->z_sb->s_flags &= ~SB_POSIXACL; diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops.c index 2d104a5001ec..b668c7dff013 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops.c @@ -1234,8 +1234,8 @@ zfs_access(struct inode *ip, int mode, int flag, cred_t *cr) */ /* ARGSUSED */ int -zfs_lookup(znode_t *zdp, char *nm, znode_t **zpp, int flags, - cred_t *cr, int *direntflags, pathname_t *realpnp) +zfs_lookup(znode_t *zdp, char *nm, znode_t **zpp, int flags, cred_t *cr, + int *direntflags, pathname_t *realpnp) { zfsvfs_t *zfsvfs = ZTOZSB(zdp); int error = 0; @@ -2543,7 +2543,7 @@ zfs_setattr_dir(znode_t *dzp) zap_cursor_t zc; zap_attribute_t zap; zfs_dirlock_t *dl; - znode_t *zp; + znode_t *zp = NULL; dmu_tx_t *tx = NULL; uint64_t uid, gid; sa_bulk_attr_t bulk[4]; |