1 Return-Path: <polatel@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 254AF429E21
\r
6 for <notmuch@notmuchmail.org>; Sun, 6 Nov 2011 01:01:37 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id dJd-t9pDECBq for <notmuch@notmuchmail.org>;
\r
17 Sun, 6 Nov 2011 01:01:35 -0700 (PDT)
\r
18 Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com
\r
19 [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 6BD9B431FB6
\r
22 for <notmuch@notmuchmail.org>; Sun, 6 Nov 2011 01:01:35 -0700 (PDT)
\r
23 Received: by faan15 with SMTP id n15so1281066faa.26
\r
24 for <notmuch@notmuchmail.org>; Sun, 06 Nov 2011 01:01:33 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=date:from:to:cc:subject:message-id:mail-followup-to:references
\r
27 :mime-version:content-type:content-disposition:in-reply-to
\r
28 :user-agent; bh=AAFXlFPXqwGGS/4ce6D0k/m8+aQrBtI9kROfEJfG9jk=;
\r
29 b=TDtrA66X2wf0lR5406MBxRF47v/+rgztwVTQZL6NpfGC4zLOXlxE0iL/mAtM2t6NAl
\r
30 yYEofU/MVck7H7/fBNRi8NN9KHSUkZDdG6+vljb8LwF91yGZJoxRnAaMW+a/GnQL3DjQ
\r
31 tf6Xwf32TDyDikC3qVTU/yh9N2YrXkj5OdW+Y=
\r
32 Received: by 10.152.102.138 with SMTP id fo10mr4043481lab.44.1320566493739;
\r
33 Sun, 06 Nov 2011 01:01:33 -0700 (PDT)
\r
34 Received: from localhost ([88.251.190.249])
\r
35 by mx.google.com with ESMTPS id po16sm4902581lab.2.2011.11.06.01.01.30
\r
36 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Sun, 06 Nov 2011 01:01:31 -0700 (PDT)
\r
38 Date: Sun, 6 Nov 2011 10:01:26 +0200
\r
39 From: Ali Polatel <polatel@gmail.com>
\r
40 To: David Riebenbauer <davrieb@liegesta.at>
\r
41 Subject: Re: [PATCH 1/2] notmuch-deliver: Retry with readwrite if splice()
\r
43 Message-ID: <20111106080126.GA14031@hayalet>
\r
44 Mail-Followup-To: David Riebenbauer <davrieb@liegesta.at>,
\r
45 Notmuch Mailing List <notmuch@notmuchmail.org>
\r
46 References: <1320557668-2314-1-git-send-email-davrieb@liegesta.at>
\r
48 Content-Type: text/plain; charset=us-ascii; format=flowed
\r
49 Content-Disposition: inline
\r
50 In-Reply-To: <1320557668-2314-1-git-send-email-davrieb@liegesta.at>
\r
51 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
52 Cc: Notmuch Mailing List <notmuch@notmuchmail.org>
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Sun, 06 Nov 2011 08:01:37 -0000
\r
69 Thanks for resending the patches!
\r
71 On Sun, Nov 06, 2011 at 06:34:27AM +0100, David Riebenbauer wrote:
\r
72 >notmuch-deliver should not just fail, when splice() doesn't work. Fall
\r
73 >back to the readwrite method even if NOTMUCH_DELIVER_NO_SPLICE is not
\r
76 This is a trivial change but I'm rather curious about the reasoning.
\r
77 Did you have a problem with splice() not working?
\r
80 > contrib/notmuch-deliver/src/main.c | 10 +++++++---
\r
81 > 1 files changed, 7 insertions(+), 3 deletions(-)
\r
83 >diff --git a/contrib/notmuch-deliver/src/main.c b/contrib/notmuch-deliver/src/main.c
\r
84 >index f7a4eaa..8423d91 100644
\r
85 >--- a/contrib/notmuch-deliver/src/main.c
\r
86 >+++ b/contrib/notmuch-deliver/src/main.c
\r
87 >@@ -252,9 +252,13 @@ save_maildir(int fdin, const char *dir, int auto_create, char **path)
\r
89 > g_debug("Reading from standard input and writing to `%s'", info.tmpname);
\r
90 > #ifdef HAVE_SPLICE
\r
91 >- ret = g_getenv("NOTMUCH_DELIVER_NO_SPLICE")
\r
92 >- ? save_readwrite(fdin, fdout)
\r
93 >- : save_splice(fdin, fdout);
\r
94 >+ if (g_getenv("NOTMUCH_DELIVER_NO_SPLICE"))
\r
95 >+ ret = save_readwrite(fdin, fdout);
\r
97 >+ ret = save_splice(fdin, fdout);
\r
99 >+ ret = save_readwrite(fdin, fdout);
\r
102 I'm inclined to think this retry should be user configurable as well.
\r
103 How about we remove NOTMUCH_DELIVER_NO_SPLICE environment variable and
\r
104 add a command line flag like --save-method which may have the following
\r
107 --save-method=readwrite calls save_readwrite()
\r
108 --save-method=splice calls save_splice()
\r
109 --save-method=readwrite,splice try save_readwrite() and then splice()
\r
110 --save-method=splice,readwrite try save_splice and then readwrite()
\r
112 The second invocation should fail in case splice is not available. Also
\r
113 adding an environment variable like NOTMUCH_DELIVER_SAVE_METHOD so
\r
114 people can stick it into their dotfiles is a good idea.
\r
121 > ret = save_readwrite(fdin, fdout);
\r
122 > #endif /* HAVE_SPLICE */
\r