vfs_ceph: fix cephwrap_chdir()
Jeremy Allison
jra at samba.org
Thu Jul 20 18:23:01 UTC 2017
On Sat, Jul 15, 2017 at 02:41:44AM +0200, David Disseldorp via samba-technical wrote:
> Hi,
>
> vfs_ceph directory listings are currently broken. Please find a proposed
> fix for bug 12911 attached.
LGTM. Obvious fix. RB+.
Jeremy.
> From 0f24b442b16775b76d3bdef0319db25380c322ba Mon Sep 17 00:00:00 2001
> From: David Disseldorp <ddiss at samba.org>
> Date: Fri, 14 Jul 2017 23:55:29 +0200
> Subject: [PATCH] vfs_ceph: fix cephwrap_chdir()
>
> When provided a '/' path (i.e. CephFS root), vfs_ceph does a *local*
> chdir() to the share path. This breaks smb client directory listings.
>
> Bug: https://bugzilla.samba.org/show_bug.cgi?id=12911
>
> Signed-off-by: David Disseldorp <ddiss at samba.org>
> ---
> source3/modules/vfs_ceph.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
> index 73106c4ac60..9abd32196a8 100644
> --- a/source3/modules/vfs_ceph.c
> +++ b/source3/modules/vfs_ceph.c
> @@ -936,14 +936,6 @@ static int cephwrap_chdir(struct vfs_handle_struct *handle,
> {
> int result = -1;
> DBG_DEBUG("[CEPH] chdir(%p, %s)\n", handle, smb_fname->base_name);
> - /*
> - * If the path is just / use chdir because Ceph is below / and
> - * cannot deal with changing directory above its mount point
> - */
> - if (!strcmp(smb_fname->base_name, "/")) {
> - return chdir(smb_fname->base_name);
> - }
> -
> result = ceph_chdir(handle->data, smb_fname->base_name);
> DBG_DEBUG("[CEPH] chdir(...) = %d\n", result);
> WRAP_RETURN(result);
> --
> 2.12.3
>
More information about the samba-technical
mailing list