[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Fri Jun 28 12:53:01 UTC 2019


The branch, master has been updated
       via  fee8cf326bf vfs:glusterfs_fuse: treat ENOATTR as ENOENT
       via  8899eb21d48 vfs:glusterfs: treat ENOATTR as ENOENT
      from  6e5bff80a0a s3:notifyd: Handle sigup in notifyd to reparse smb.conf

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit fee8cf326bfe240d3a8720569eab43f474349aff
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 20 15:14:57 2019 +0200

    vfs:glusterfs_fuse: treat ENOATTR as ENOENT
    
    The original implementation of the virtual xattr get_real_filename
    in gluster was misusing the ENOENT errno as the authoritative anwer
    that the file/dir that we were asking the real filename for does not
    exist. But since the getxattr call is done on the parent directory,
    this is a violation of the getxattr API which uses ENOENT for the
    case that the file/dir that the getxattr call is done against does
    not exist.
    
    Now after a recent regression for fuse-mount re-exports due to
    gluster mapping ENOENT to ESTALE in the fuse-bridge, the gluster
    implementation is changed to more correctly return ENOATTR if the
    requested file does not exist.
    
    This patch changes the glusterfs_fuse vfs module to treat ENOATTR as
    ENOENT to be fully functional again with latest gluster.
    
    - Without this patch, samba against a new gluster will work correctly,
      but the get_real_filename optimization for a non-existing entry
      is lost.
    
    - With this patch, Samba will not work correctly any more against
      very old gluster servers: Those (correctly) returned ENOATTR
      always, which Samba originally interpreted as EOPNOTSUPP, triggering
      the expensive directory scan. With this patch, ENOATTR is
      interpreted as ENOENT, the authoritative answer that the requested
      entry does not exist, which is wrong unless it really does not exist.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Fri Jun 28 12:52:03 UTC 2019 on sn-devel-184

commit 8899eb21d48b7077328ae560490f9fb9715a6b83
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 20 15:14:57 2019 +0200

    vfs:glusterfs: treat ENOATTR as ENOENT
    
    The original implementation of the virtual xattr get_real_filename
    in gluster was misusing the ENOENT errno as the authoritative anwer
    that the file/dir that we were asking the real filename for does not
    exist. But since the getxattr call is done on the parent directory,
    this is a violation of the getxattr API which uses ENOENT for the
    case that the file/dir that the getxattr call is done against does
    not exist.
    
    Now after a recent regression for fuse-mount re-exports due to
    gluster mapping ENOENT to ESTALE in the fuse-bridge, the gluster
    implementation is changed to more correctly return ENOATTR if the
    requested file does not exist.
    
    This patch changes the glusterfs vfs module to treat ENOATTR as ENOENT
    to be fully functional again with latest gluster.
    
    - Without this patch, samba against a new gluster will work correctly,
      but the get_real_filename optimization for a non-existing entry
      is lost.
    
    - With this patch, Samba will not work correctly any more against
      very old gluster servers: Those (correctly) returned ENOATTR
      always, which Samba originally interpreted as EOPNOTSUPP, triggering
      the expensive directory scan. With this patch, ENOATTR is
      interpreted as ENOENT, the authoritative answer that the requested
      entry does not exist, which is wrong unless it really does not exist.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_glusterfs.c      | 2 +-
 source3/modules/vfs_glusterfs_fuse.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index e8617215355..95f32f9d0a6 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1473,7 +1473,7 @@ static int vfs_gluster_get_real_filename(struct vfs_handle_struct *handle,
 			    GLUSTER_NAME_MAX + 1);
 	if (ret == -1) {
 		if (errno == ENOATTR) {
-			errno = EOPNOTSUPP;
+			errno = ENOENT;
 		}
 		return -1;
 	}
diff --git a/source3/modules/vfs_glusterfs_fuse.c b/source3/modules/vfs_glusterfs_fuse.c
index d92f5e2b08b..51515aa0df4 100644
--- a/source3/modules/vfs_glusterfs_fuse.c
+++ b/source3/modules/vfs_glusterfs_fuse.c
@@ -45,7 +45,7 @@ static int vfs_gluster_fuse_get_real_filename(struct vfs_handle_struct *handle,
 	ret = getxattr(path, key_buf, val_buf, GLUSTER_NAME_MAX + 1);
 	if (ret == -1) {
 		if (errno == ENOATTR) {
-			errno = EOPNOTSUPP;
+			errno = ENOENT;
 		}
 		return -1;
 	}


-- 
Samba Shared Repository



More information about the samba-cvs mailing list