gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] [PATCH v9] vfs_glusterfs: Samba VFS module for glust


From: Anand Avati
Subject: Re: [Gluster-devel] [PATCH v9] vfs_glusterfs: Samba VFS module for glusterfs
Date: Wed, 29 May 2013 12:23:04 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

On 5/29/13 5:23 AM, Andrew Bartlett wrote:
On Wed, 2013-05-29 at 07:21 -0400, Anand Avati wrote:
Implement a Samba VFS plugin for glusterfs based on gluster's gfapi.
This is a "bottom" vfs plugin (not something to be stacked on top of
another module), and translates (most) calls into closest actions
on gfapi.

Reviewed-by: Andrew Bartlett <address@hidden>
Signed-off-by: Anand Avati <address@hidden>

Thanks.  If nobody else pushes this to master by tomorrow, I'll handle
it then.

Thank you for your patience!

Andrew Bartlett


We just uncovered this issue in our QE testing -

On Wed, May 29, 2013 at 4:21 AM, Anand Avati <address@hidden> wrote:
+static DIR *vfs_gluster_fdopendir(struct vfs_handle_struct *handle,
+                                 files_struct *fsp, const char *mask,
+                                 uint32 attributes)
+{
+       return (DIR *) glfd_fd_get(fsp->fh->fd);
+}

When code takes this vfs_fdopendir() path (happened when testing fsstress, most of the times vfs_opendir() is called - not sure why), we are just passing a pointer of glfs_fd structure ...

+static int vfs_gluster_closedir(struct vfs_handle_struct *handle, DIR *dirp)
+{
+       return glfs_closedir((void *)dirp);
+}

... and Samba does a vfs_closedir() _and_ vfs_close(), essentially doing a double free on the glfs_fd structure.

I am sending out a v10 patch which fixes this by doing a glfs_dup() in vfs_fdopendir().

Avati



reply via email to

[Prev in Thread] Current Thread [Next in Thread]