aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2020-10-17 00:05:34 +0000
committerMatt Macy <mmacy@FreeBSD.org>2020-10-17 00:05:34 +0000
commit0be360124f8f108f73365e31448e7550f877f3ac (patch)
tree78557e980720fdcfd76497e6630c29ce1688559c /module/os/linux/zfs
parente2228bd99047bb6a0cef0da931147b1f28f155c2 (diff)
downloadsrc-vendor/openzfs.tar.gz
src-vendor/openzfs.zip
Update OpenZFS to 2.0.0-rc3-gbd565fvendor/openzfs/2.0.0-rc3-gfc5966vendor/openzfs
Notes
Notes: svn path=/vendor-sys/openzfs/dist/; revision=366774 svn path=/vendor-sys/openzfs/2.0.0-rc3-gfc5966/; revision=366775; tag=vendor/openzfs/2.0.0-rc3-gfc5966
Diffstat (limited to 'module/os/linux/zfs')
-rw-r--r--module/os/linux/zfs/zfs_acl.c2
-rw-r--r--module/os/linux/zfs/zfs_ctldir.c25
-rw-r--r--module/os/linux/zfs/zfs_dir.c9
-rw-r--r--module/os/linux/zfs/zfs_vfsops.c1
-rw-r--r--module/os/linux/zfs/zfs_vnops.c6
5 files changed, 23 insertions, 20 deletions
diff --git a/module/os/linux/zfs/zfs_acl.c b/module/os/linux/zfs/zfs_acl.c
index 11b5559321ad..2628325c0ba9 100644
--- a/module/os/linux/zfs/zfs_acl.c
+++ b/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/module/os/linux/zfs/zfs_ctldir.c b/module/os/linux/zfs/zfs_ctldir.c
index 26e785a0d422..c13a9771235d 100644
--- a/module/os/linux/zfs/zfs_ctldir.c
+++ b/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/module/os/linux/zfs/zfs_dir.c b/module/os/linux/zfs/zfs_dir.c
index 383657208df3..207a51d75bc9 100644
--- a/module/os/linux/zfs/zfs_dir.c
+++ b/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/module/os/linux/zfs/zfs_vfsops.c b/module/os/linux/zfs/zfs_vfsops.c
index 15ec7b91b001..b218237d07ff 100644
--- a/module/os/linux/zfs/zfs_vfsops.c
+++ b/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/module/os/linux/zfs/zfs_vnops.c b/module/os/linux/zfs/zfs_vnops.c
index 2d104a5001ec..b668c7dff013 100644
--- a/module/os/linux/zfs/zfs_vnops.c
+++ b/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];