Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 May 2001 07:51:31 -0700 (PDT)
From:      conrad@th.physik.uni-bonn.de
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/27203: mail/cclient sucks rocks when saving over NFS mounts
Message-ID:  <200105081451.f48EpVP48405@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105081451.f48EpVP48405>