[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri Mar 12 20:39:02 UTC 2021
The branch, master has been updated
via fd1b09bb3b2 VFS: glusterfs: Ensure vfs_gluster_fsetxattr() only uses an io fd for a handle based call.
via d89565ceeb5 VFS: glusterfs: Ensure vfs_gluster_flistxattr() only uses an io fd for a handle based call.
via cb782687146 VFS: ceph: Ensure cephwrap_fsetxattr() only uses an io fd for a handle based call.
via e4540a6b635 VFS: ceph: Ensure cephwrap_flistxattr() only uses an io fd for a handle based call.
from 16a1aefb72f smbd: call set_current_user_info() in smbd_become_authenticated_pipe_user()
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit fd1b09bb3b2b54abb8830aa15539cd8d4b8237a1
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 11 23:06:37 2021 -0800
VFS: glusterfs: Ensure vfs_gluster_fsetxattr() only uses an io fd for a handle based call.
Otherwise fall back to pathname based. This is the same as the
fallback used in vfs_default.c
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Mar 12 20:38:03 UTC 2021 on sn-devel-184
commit d89565ceeb5b7df2d230382a636ff3983898aeec
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 11 23:03:19 2021 -0800
VFS: glusterfs: Ensure vfs_gluster_flistxattr() only uses an io fd for a handle based call.
Otherwise fall back to pathname based. This is the same as the
fallback used in vfs_default.c
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit cb782687146505d6bcc653f62f175befd4792360
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 11 23:00:14 2021 -0800
VFS: ceph: Ensure cephwrap_fsetxattr() only uses an io fd for a handle based call.
Otherwise fall back to pathname based. This is the same as the
fallback used in vfs_default.c
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e4540a6b6351a0c3c3a810d1100892fb23e19b7b
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 11 22:55:33 2021 -0800
VFS: ceph: Ensure cephwrap_flistxattr() only uses an io fd for a handle based call.
Otherwise fall back to pathname based. This is the same as the
fallback used in vfs_default.c
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_ceph.c | 41 ++++++++++++++++++++++++++++++++++++++---
source3/modules/vfs_glusterfs.c | 33 ++++++++++++++++++++++++++++++---
2 files changed, 68 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 6eb432e2c98..e2f3691bc4f 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -1283,7 +1283,23 @@ static ssize_t cephwrap_flistxattr(struct vfs_handle_struct *handle, struct file
int ret;
DBG_DEBUG("[CEPH] flistxattr(%p, %p, %p, %llu)\n",
handle, fsp, list, llu(size));
- ret = ceph_flistxattr(handle->data, fsp_get_io_fd(fsp), list, size);
+ if (!fsp->fsp_flags.is_pathref) {
+ /*
+ * We can use an io_fd to list xattrs.
+ */
+ ret = ceph_flistxattr(handle->data,
+ fsp_get_io_fd(fsp),
+ list,
+ size);
+ } else {
+ /*
+ * This is no longer a handle based call.
+ */
+ ret = ceph_listxattr(handle->data,
+ fsp->fsp_name->base_name,
+ list,
+ size);
+ }
DBG_DEBUG("[CEPH] flistxattr(...) = %d\n", ret);
if (ret < 0) {
WRAP_RETURN(ret);
@@ -1316,8 +1332,27 @@ static int cephwrap_fsetxattr(struct vfs_handle_struct *handle, struct files_str
{
int ret;
DBG_DEBUG("[CEPH] fsetxattr(%p, %p, %s, %p, %llu, %d)\n", handle, fsp, name, value, llu(size), flags);
- ret = ceph_fsetxattr(handle->data, fsp_get_io_fd(fsp),
- name, value, size, flags);
+ if (!fsp->fsp_flags.is_pathref) {
+ /*
+ * We can use an io_fd to set xattrs.
+ */
+ ret = ceph_fsetxattr(handle->data,
+ fsp_get_io_fd(fsp),
+ name,
+ value,
+ size,
+ flags);
+ } else {
+ /*
+ * This is no longer a handle based call.
+ */
+ ret = ceph_setxattr(handle->data,
+ fsp->fsp_name->base_name,
+ name,
+ value,
+ size,
+ flags);
+ }
DBG_DEBUG("[CEPH] fsetxattr(...) = %d\n", ret);
WRAP_RETURN(ret);
}
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index c3fe1c60f7f..38c8a48c378 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -2049,8 +2049,20 @@ static ssize_t vfs_gluster_flistxattr(struct vfs_handle_struct *handle,
DBG_ERR("Failed to fetch gluster fd\n");
return -1;
}
-
- return glfs_flistxattr(glfd, list, size);
+ if (!fsp->fsp_flags.is_pathref) {
+ /*
+ * We can use an io_fd to list xattrs.
+ */
+ return glfs_flistxattr(glfd, list, size);
+ } else {
+ /*
+ * This is no longer a handle based call.
+ */
+ return glfs_listxattr(handle->data,
+ fsp->fsp_name->base_name,
+ list,
+ size);
+ }
}
static int vfs_gluster_removexattr(struct vfs_handle_struct *handle,
@@ -2082,7 +2094,22 @@ static int vfs_gluster_fsetxattr(struct vfs_handle_struct *handle,
return -1;
}
- return glfs_fsetxattr(glfd, name, value, size, flags);
+ if (!fsp->fsp_flags.is_pathref) {
+ /*
+ * We can use an io_fd to set xattrs.
+ */
+ return glfs_fsetxattr(glfd, name, value, size, flags);
+ } else {
+ /*
+ * This is no longer a handle based call.
+ */
+ return glfs_setxattr(handle->data,
+ fsp->fsp_name->base_name,
+ name,
+ value,
+ size,
+ flags);
+ }
}
/* AIO Operations */
--
Samba Shared Repository
More information about the samba-cvs
mailing list