Module Name:    src
Committed By:   manu
Date:           Mon Oct 11 01:12:26 UTC 2010

Modified Files:
        src/usr.sbin/perfused: msg.c

Log Message:
Interm hack raising buffers for /dev/fuse socket used in the filesystem.
This works around read(2) system callsfailing with ENOBUFS.

This is a hack bedause there is no way to know that 4 * FUSE_BUFSIZE
will be enough to hold queued FUSE frames. It seems good enough at
mine.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/perfused/msg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/perfused/msg.c
diff -u src/usr.sbin/perfused/msg.c:1.7 src/usr.sbin/perfused/msg.c:1.8
--- src/usr.sbin/perfused/msg.c:1.7	Mon Sep 20 06:45:38 2010
+++ src/usr.sbin/perfused/msg.c	Mon Oct 11 01:12:25 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: msg.c,v 1.7 2010/09/20 06:45:38 manu Exp $ */
+/*  $NetBSD: msg.c,v 1.8 2010/10/11 01:12:25 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -68,14 +68,15 @@
 	(void)strcpy(sun.sun_path, _PATH_FUSE); 
 
 	/*
-	 * Set a buffer lentgh large enough so that any FUSE packet
-	 * will fit.
+	 * Set a buffer lentgh large enough so that a few FUSE packets
+	 * will fit. 
+	 * XXX We will have to find how many packets we need
 	 */
-	opt = FUSE_BUFSIZE;
+	opt = 4 * FUSE_BUFSIZE;
 	if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &opt, sizeof(opt)) != 0)
 		DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt);
 
-	opt = FUSE_BUFSIZE;
+	opt = 4 * FUSE_BUFSIZE;
 	if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, &opt, sizeof(opt)) != 0)
 		DWARN("%s: setsockopt SO_RCVBUF to %d failed", __func__, opt);
 

Reply via email to