Ticket #1076 (new defect)

Opened 7 years ago

Last modified 20 months ago

mutt: fsync()s repeatedly when saving messages to different folder

Reported by: Marco d'Itri <md@…> Owned by: mutt-dev
Priority: minor Milestone:
Component: mutt Version:
Keywords: Cc: 136139@…

Description

Package: mutt
Version: 1.3.27-2
Severity: normal

[NOTE: this bug report has been submitted to the debian BTS as Bug#136139.
Please Cc all your replies to 136139@bugs.debian.org .]

From: Erno Kuusela <erno-debbugs@erno.iki.fi>
Subject: mutt: fsync()s repeatedly when saving messages to different folder
Date: Thu, 28 Feb 2002 07:47:32 +0200

when i tag some messages and hit s to move them to a different folder,
mutt seems fsync()s the destination folder file after writing each
message (checked with strace). this makes working with many messages
incredibly slow.

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux fabulous 2.4.9-ac5 #3 Wed Sep 5 05:01:06 EEST 2001 i686
Locale: LANG=C, LC_CTYPE=fi_FI

Versions of packages mutt depends on:
ii  libc6                    2.2.5-3         GNU C Library: Shared libraries an
ii  libncurses5              5.2.20020112a-3 Shared libraries for terminal hand
ii  libsasl7                 1.5.27-2        Authentication abstraction library
ii  postfix [mail-transport- 1.1.3-1         A high-performance mail transport 



>How-To-Repeat:
	
>Fix:

Change History

Changed 7 years ago by Daniel Eisenbud <eisenbud+mutt@…>

On Fri, Mar 01, 2002 at 12:30:18AM +0100, Thomas Roessler <roessler@does-not-exist.org> wrote:
> On 2002-02-28 19:40:38 +0100, Marco d'Itri wrote:
> 
> >Subject: mutt: fsync()s repeatedly when saving messages to 
> >different folder
> 
> Bad enough, that's the price we pay for detecting write failures due 
> to full disks mounted via NFS, or quota.  If write(2) wouldn't be 
> such a liar, we wouldn't have to use fsync. ;-)

Maybe I'm confused, but why can't we just detect this at the end of
writing all those messages when we fsync(), give an error, truncate the
mailbox we were trying to write to to its former length, and not delete
any of the messages in the current mailbox?  Losing mail is obviously
worse than slowing down copying, but if we can speed up copying without
the risk of losing mail, we should.

-Daniel

-- 
Daniel E. Eisenbud
eisenbud@cs.swarthmore.edu

"We should go forth on the shortest walk perchance, in the spirit of
undying adventure, never to return,--prepared to send back our embalmed
hearts only as relics to our desolate kingdoms."
					--Henry David Thoreau, "Walking"

Changed 7 years ago by Marco d'Itri <md@…>

Package: mutt
Version: 1.3.27-2
Severity: normal

[NOTE: this bug report has been submitted to the debian BTS as Bug#136139.
Please Cc all your replies to 136139@bugs.debian.org .]

From: Erno Kuusela <erno-debbugs@erno.iki.fi>
Subject: mutt: fsync()s repeatedly when saving messages to different folder
Date: Thu, 28 Feb 2002 07:47:32 +0200

when i tag some messages and hit s to move them to a different folder,
mutt seems fsync()s the destination folder file after writing each
message (checked with strace). this makes working with many messages
incredibly slow.

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux fabulous 2.4.9-ac5 #3 Wed Sep 5 05:01:06 EEST 2001 i686
Locale: LANG=C, LC_CTYPE=fi_FI

Versions of packages mutt depends on:
ii  libc6                    2.2.5-3         GNU C Library: Shared libraries an
ii  libncurses5              5.2.20020112a-3 Shared libraries for terminal hand
ii  libsasl7                 1.5.27-2        Authentication abstraction library
ii  postfix [mail-transport- 1.1.3-1         A high-performance mail transport

Changed 7 years ago by Thomas Roessler <roessler@…>

On 2002-02-28 19:40:38 +0100, Marco d'Itri wrote:

>Subject: mutt: fsync()s repeatedly when saving messages to 
>different folder

Bad enough, that's the price we pay for detecting write failures due 
to full disks mounted via NFS, or quota.  If write(2) wouldn't be 
such a liar, we wouldn't have to use fsync. ;-)

-- 
Thomas Roessler                        <roessler@does-not-exist.org>

Changed 7 years ago by Daniel Eisenbud <eisenbud+mutt@…>

On Fri, Mar 08, 2002 at 07:55:27PM +0200, Erno Kuusela <erno@iki.fi> wrote:
> is it not possible to detect if the mailbox is on a nfs filesystem?

Probably not portably.  But nobody ever answered my previous question
about why this is even necessary in the first place.

-Daniel

-- 
Daniel E. Eisenbud
eisenbud@cs.swarthmore.edu

"We should go forth on the shortest walk perchance, in the spirit of
undying adventure, never to return,--prepared to send back our embalmed
hearts only as relics to our desolate kingdoms."
					--Henry David Thoreau, "Walking"

Changed 7 years ago by Erno Kuusela <erno@…>

hello,

is it not possible to detect if the mailbox is on a nfs filesystem?

 -- erno
Note: See TracTickets for help on using tickets.