Module Name: src Committed By: manu Date: Wed May 18 15:25:19 UTC 2011
Modified Files: src/lib/libperfuse: perfuse.c Log Message: Set buffer size as big in nomal mode as we do in debug mode, when perfused stays in foreground. The difference is a mistake and was not intended. There is still a bug ready to bite here, since SOCK_STREAM is not reliable. We just hope that buffers are big enough to hold all packets, but if they are overflown, we loose a packet and a file operation gets stuck. We really nee SOCk_SEQPACKET here, but unfortunately it is very broken at that time. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libperfuse/perfuse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libperfuse/perfuse.c diff -u src/lib/libperfuse/perfuse.c:1.13 src/lib/libperfuse/perfuse.c:1.14 --- src/lib/libperfuse/perfuse.c:1.13 Thu May 12 10:32:41 2011 +++ src/lib/libperfuse/perfuse.c Wed May 18 15:25:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: perfuse.c,v 1.13 2011/05/12 10:32:41 manu Exp $ */ +/* $NetBSD: perfuse.c,v 1.14 2011/05/18 15:25:19 manu Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -197,22 +197,22 @@ * Set a buffer lentgh large enough so that any FUSE packet * will fit. */ - opt = FUSE_BUFSIZE; + opt = 4 * FUSE_BUFSIZE; optlen = sizeof(opt); if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &opt, optlen) != 0) DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt); - opt = FUSE_BUFSIZE; + opt = 4 * FUSE_BUFSIZE; optlen = sizeof(opt); if (setsockopt(sv[0], SOL_SOCKET, SO_RCVBUF, &opt, optlen) != 0) DWARN("%s: setsockopt SO_RCVBUF to %d failed", __func__, opt); - opt = FUSE_BUFSIZE; + opt = 4 * FUSE_BUFSIZE; optlen = sizeof(opt); if (setsockopt(sv[1], SOL_SOCKET, SO_SNDBUF, &opt, optlen) != 0) DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt); - opt = FUSE_BUFSIZE; + opt = 4 * FUSE_BUFSIZE; optlen = sizeof(opt); if (setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &opt, optlen) != 0) DWARN("%s: setsockopt SO_RCVBUF to %d failed", __func__, opt);