The Samba-Bugzilla – Attachment 15263 Details for
Bug 14010
Unable to create or rename file/directory inside shares configured with vfs_glusterfs_fuse module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patchset for master to fix the issue.
samba-gluster-ENOENT-ENOATTR.patch (text/plain), 3.42 KB, created by
Michael Adam
on 2019-06-25 17:25:07 UTC
(
hide
)
Description:
Patchset for master to fix the issue.
Filename:
MIME Type:
Creator:
Michael Adam
Created:
2019-06-25 17:25:07 UTC
Size:
3.42 KB
patch
obsolete
>From 46080a7a3a1965d993dc12d6b8ed3598ad54b3c2 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Thu, 20 Jun 2019 15:14:57 +0200 >Subject: [PATCH 1/2] 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. > >Signed-off-by: Michael Adam <obnox@samba.org> >--- > source3/modules/vfs_glusterfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c >index 2b5385e44b0..90a91dff077 100644 >--- a/source3/modules/vfs_glusterfs.c >+++ b/source3/modules/vfs_glusterfs.c >@@ -1487,7 +1487,7 @@ static int vfs_gluster_get_real_filename(struct vfs_handle_struct *handle, > ret = glfs_getxattr(handle->data, path, key_buf, val_buf, NAME_MAX + 1); > if (ret == -1) { > if (errno == ENOATTR) { >- errno = EOPNOTSUPP; >+ errno = ENOENT; > } > return -1; > } >-- >2.21.0 > > >From 70e4a53353c4eeeed57bc80198c686d7d2a51598 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Thu, 20 Jun 2019 15:14:57 +0200 >Subject: [PATCH 2/2] 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. > >Signed-off-by: Michael Adam <obnox@samba.org> >--- > source3/modules/vfs_glusterfs_fuse.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/modules/vfs_glusterfs_fuse.c b/source3/modules/vfs_glusterfs_fuse.c >index 0b1de9fcdb2..556277515cd 100644 >--- a/source3/modules/vfs_glusterfs_fuse.c >+++ b/source3/modules/vfs_glusterfs_fuse.c >@@ -59,7 +59,7 @@ static int vfs_gluster_fuse_get_real_filename(struct vfs_handle_struct *handle, > ret = getxattr(path, key_buf, val_buf, name_max + 1); > if (ret == -1) { > if (errno == ENOATTR) { >- errno = EOPNOTSUPP; >+ errno = ENOENT; > } > return -1; > } >-- >2.21.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14010
:
15263
|
15264
|
15279