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

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

>Number:         27202
>Category:       ports
>Synopsis:       mail/pine 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 attachments/mailboxes in 512 byte chunks
>How-To-Repeat:
On an NFS mounted home go to a 2MB attachment and type (S)ave
Then walk over to your file server and listen how your disks go wild!

If you don't believe it, do a ktrace... :-)
>Fix:
The following fixes only non mailbox saves
(I'll send another PR for cclient)

Of course one could do that in a nicer way, but I already spent a lot
of time to find that out...

diff -ruN pine/filter.c.orig pine/filter.c
--- pine/filter.c.orig  Fri Dec 29 00:34:07 2000
+++ pine/filter.c       Tue May  8 16:41:00 2001
@@ -288,8 +288,14 @@
     /*
      * Use open instead of fopen so we can make temp files private.
      */
-    return(((fd = open(so->name, flags, mode)) >= 0)
-            ? (so->txt = (void *) fdopen(fd, type)) : NULL);
+ 
+     if ((fd = open(so->name, flags, mode)) >= 0) {
+       so->txt = (void *) fdopen(fd, type);
+       setvbuf (so->txt, NULL, _IOFBF, 32*1024);
+       return (so->txt);
+     } else {
+       return (NULL);
+     };
 }



>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.f48EpTC48400>