[PATCH] Fix Gluster bug - unable to create file/directory under root of the share due to empty dirpath during get_real_filename()

Jeremy Allison jra at samba.org
Wed Aug 22 16:49:04 UTC 2018

On Wed, Aug 22, 2018 at 06:43:11PM +0200, Michael Adam wrote:
> Yeah, FUD helps convince me. :-)
> It's ok. But cleaning up (later) the areas of code that are
> so scaring is probably a good thing.

Yes, that's why I'm trying to do that.

> > When I post my cleanup patch for you to review
> > you can be sure I've checked out all the possibilities
> > I can think of :-).
> Looking forward to seeing it.

Might be a little which. It is conceptually a
simple change, but the interaction with the stat-cache
is the hairball I want to make sure is OK.

> Er. Where is the review+? (probably not on the list)
> My mail was more of a review- until we sort out
> this discussion.

Ira review+'ed it in a private mail. Plus I
saw your +1 on the specific patch with a commitment
to clean up later as a go-ahead.

> > Your gluster-specific fix, whilst not wrong, isn't general enough.
> Hm. You say it's a gluster-specific bug to be fixed.
> And you fixed it in one layer above the call to
> the gluster specific function. So yours is too
> general (I'd say). But mine fixed it at the gluster level

Nope, as you pointed out there may be other
filesystems that need this issue fixing in
the same way.

> and you say it's not general enough. How can that
> be? There's exactly one call between the two places.

Fixing it in vfs_glusterfs isn't where it's already
done in get_real_filename_full_scan(), so doing it
in get_real_filename() which can call get_real_filename_full_scan()
makes it general for all VFS filesystems that might need it.

Your fix is specific to Gluster, not general enough.

More information about the samba-technical mailing list