From owner-freebsd-ports Tue May 8 8: 0:25 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2231337B424 for ; Tue, 8 May 2001 08:00:12 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f48F0Cm49572; Tue, 8 May 2001 08:00:12 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E2E0F37B423 for ; Tue, 8 May 2001 07:51:31 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f48EpVP48405; Tue, 8 May 2001 07:51:31 -0700 (PDT) (envelope-from nobody) Message-Id: <200105081451.f48EpVP48405@freefall.freebsd.org> Date: Tue, 8 May 2001 07:51:31 -0700 (PDT) From: conrad@th.physik.uni-bonn.de To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: ports/27203: mail/cclient sucks rocks when saving over NFS mounts Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 27203 >Category: ports >Synopsis: mail/cclient sucks rocks when saving over NFS mounts >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue May 08 08:00:11 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jan Conrad >Release: FreeBSD4.3R >Organization: Univ. Bonn, Germany >Environment: does'nt matter >Description: pine writes out mailboxes in 512 byte chunks (using cclient) >How-To-Repeat: On an NFS mounted home go to a 2MB message and type (S)ave Then walk over to your file server and listen how your disks go wild! >Fix: This is the fix for cclient (I'll send another PR for pine) Of course one could do that in a nicer way, but I already spent a lot of time to find that out... diff -ruN src/osdep/unix/unix.c.orig src/osdep/unix/unix.c --- src/osdep/unix/unix.c.orig Thu Apr 12 04:15:44 2001 +++ src/osdep/unix/unix.c Tue May 8 16:48:07 2001 @@ -914,6 +914,7 @@ } fstat (fd,&sbuf); /* get current file size */ rewind (sf); + setvbuf (df, NULL, _IOFBF, 32*1024); for (; i && ((j = fread (buf,1,min ((long) BUFLEN,i),sf)) && (fwrite (buf,1,j,df) == j)); i -= j); fclose (sf); /* done with scratch file */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message