Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/perfused Interm hack raising buffers for /dev/fuse ...
details: https://anonhg.NetBSD.org/src/rev/1c7df9e8d580
branches: trunk
changeset: 757985:1c7df9e8d580
user: manu <manu%NetBSD.org@localhost>
date: Mon Oct 11 01:12:25 2010 +0000
description:
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.
diffstat:
usr.sbin/perfused/msg.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (29 lines):
diff -r f6e9fcd56271 -r 1c7df9e8d580 usr.sbin/perfused/msg.c
--- a/usr.sbin/perfused/msg.c Mon Oct 11 01:08:26 2010 +0000
+++ b/usr.sbin/perfused/msg.c Mon Oct 11 01:12:25 2010 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index