Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libperfuse Set buffer size as big in nomal mode as we do...
details: https://anonhg.NetBSD.org/src/rev/a1c8d30c7d1e
branches: trunk
changeset: 765074:a1c8d30c7d1e
user: manu <manu%NetBSD.org@localhost>
date: Wed May 18 15:25:19 2011 +0000
description:
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.
diffstat:
lib/libperfuse/perfuse.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r 7e30f5fd2f13 -r a1c8d30c7d1e lib/libperfuse/perfuse.c
--- a/lib/libperfuse/perfuse.c Wed May 18 15:22:54 2011 +0000
+++ b/lib/libperfuse/perfuse.c Wed May 18 15:25:19 2011 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index