[Gluster-devel] 3.4.0qa1: protocol error on node creation

Emmanuel Dreyfus manu at netbsd.org
Sat Oct 20 09:30:29 UTC 2012


Emmanuel Dreyfus <manu at netbsd.org> wrote:

> Thanks, that fixes the crash, and I am left with the protocol error when
> creating nodes anywhere outside the root.

And I spoted the regression: I never implemented negative caching in NetBSD
FUSE. The patch below works this around.

I can implement, though. How is it supposed to work? It seems to be a
null-filled fuse_entry_out with just entry_valid and entry_valid_nsec set. How
is the kernel supposed to decide it means negiative caching? Node being VNON
type? inode being 0? 


--- fuse-bridge.c.orig  2012-10-20 11:23:29.000000000 +0200
+++ fuse-bridge.c       2012-10-20 11:24:04.000000000 +0200
@@ -361,21 +361,25 @@
         } else {
                 gf_log ("glusterfs-fuse",
                         (op_errno == ENOENT ? GF_LOG_TRACE : GF_LOG_WARNING),
                         "%"PRIu64": %s() %s => -1 (%s)", frame->root->unique,
                         gf_fop_list[frame->root->op], state->loc.path,
                         strerror (op_errno));
+#ifndef __NetBSD__
+               send_fuse_err (this, state->finh, op_errno);
+#else /* __NetBSD__ */
                if (op_errno == ENOENT) {
                        feo.entry_valid =
                                calc_timeout_sec (priv->negative_timeout);
                        feo.entry_valid_nsec =
                                calc_timeout_nsec (priv->negative_timeout);
                        send_fuse_obj (this, finh, &feo);
                } else {
                        send_fuse_err (this, state->finh, op_errno);
                }
+#endif /* __NetBSD__ */
         }
 
         free_fuse_state (state);
         STACK_DESTROY (frame->root);
         return 0;
 }

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu at netbsd.org




More information about the Gluster-devel mailing list