Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3583709imm; Wed, 5 Sep 2018 02:34:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZS6kMYsSw0qrDA+V8BtRsH8BE1aCj0iSh7uKHCSn+aD/aq9bp/h6rZFOLMF9YDoDG5fp/I X-Received: by 2002:a17:902:8605:: with SMTP id f5-v6mr37081192plo.271.1536140042217; Wed, 05 Sep 2018 02:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536140042; cv=none; d=google.com; s=arc-20160816; b=ANaD+FfUp7cisEqkQjtTnXG9i54LhnYlUDbFiy3GIe41AW6SMPjmQK3Yr6joWhgsdK yCzkoQ+cgxBAAZhcizDOsbzCbJ3ZH4uYUOHual9I9FMj5yPeRjWWLeK+jgOL6pyqMGzx OjM/LndMOSARNlS7a7t5DxoFBwxfib5FMZikV6bpLX1dBvKCPVk1k5VzsrXl9ZrHEbVy 1qKWCvMj4Pr145XZHnkEjHid4e/twNbZtUVxGb51esyDu5FSEBeeGFiqjebpP1Y3C8jO I4muM02FW1rFZwdEHE//LoSHOGEziCoDvI5GzFvXt8IUEi7VR2pJ4hIf+bBAkdlDh/CW tKsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Hr3p0JOHHGywzWmZkPOKoJ9UEDs6R+Ewk/um01G9NPY=; b=FNKAy0MZomH1PbB65sU5lPBpJo4dZhH0lEDjlr2KP2oHYqf3TPPuC6MyvMajBpS4eQ ohkoNeaiyD444+Q5UOQoc5ElUYzGLHNOdkWG2OORh4byel7w/3Nc0Zvw4MpYs61585G5 gCzivT5BBPI/9wL1KBxPxKcbP3MjB0/AqdwO1YAKQel9ryzHouYI+4aihuNc7tbqDO74 D3L9/AHXOzUePLXF8HnGOZUH/prwUAK0SNmCOivcpKFJK7TLgOpuAGyC3VjFzWDFgmda sLNYc7W/3cuorgmsWPVuPQFG5YSpv3bmTsqdCv4OW61ygYvG6TseqnMgTh+dXQ3wZfnr XJIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t79-v6si1509411pfa.170.2018.09.05.02.33.46; Wed, 05 Sep 2018 02:34:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728210AbeIEOB4 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 5 Sep 2018 10:01:56 -0400 Received: from mondschein.lichtvoll.de ([194.150.191.11]:40403 "EHLO mail.lichtvoll.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbeIEOBz (ORCPT ); Wed, 5 Sep 2018 10:01:55 -0400 Authentication-Results: auth=pass smtp.auth=martin smtp.mailfrom=martin@lichtvoll.de Received: from 127.0.0.1 (localhost [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lichtvoll.de (Postfix) with ESMTPSA id 898793A2CC8; Wed, 5 Sep 2018 11:32:32 +0200 (CEST) From: Martin Steigerwald To: Rogier Wolff Cc: Jeff Layton , =?utf-8?B?54Sm5pmT5Yas?= , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: POSIX violation by writeback error Date: Wed, 05 Sep 2018 11:32:32 +0200 Message-ID: <49555682.rh9yPTYizh@merkaba> In-Reply-To: <20180905080444.GD24519@BitWizard.nl> References: <3805399.0d8HT3LL4o@merkaba> <20180905080444.GD24519@BitWizard.nl> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rogier Wolff - 05.09.18, 10:04: > On Wed, Sep 05, 2018 at 09:39:58AM +0200, Martin Steigerwald wrote: > > Rogier Wolff - 05.09.18, 09:08: > > > So when a mail queuer puts mail the mailq files and the mail > > > processor can get them out of there intact, nobody is going to > > > notice. (I know mail queuers should call fsync and report errors > > > when that fails, but there are bound to be applications where > > > calling fsync is not appropriate (*)) > > > > AFAIK at least Postfix MDA only reports mail as being accepted over > > SMTP once fsync() on the mail file completed successfully. And I?d > > expect every sensible MDA to do this. I don?t know how Dovecot MDA > > which I currently use for sieve support does this tough. > > Yes. That's why I added the remark that mailers will call fsync and > know about it on the write side. I encountered a situation in the > last few days that when a developer runs into this while developing, > would have caused him to write: > /* Calling this fsync causes unacceptable performance */ > // fsync (fd); Hey, I still have # KDE Sync # Re: zero size file after power failure with kernel 2.6.30.5 # http://permalink.gmane.org/gmane.comp.file-systems.xfs.general/30512 export KDE_EXTRA_FSYNC=1 in my ~/.zshrc. One reason KDE developers did this was Ext3 having been so slow with fsync(). See also: Bug 187172 - truncated configuration files on power loss or hard crash https://bugs.kde.org/187172 > But when apt-get upgrade replaces your /bin/sh and gets a write error > returning error on subsequent reads is really bad. I sometimes used eatmydata with apt upgrade / dist-upgrade, but yeah, this asks for trouble on write interruptions. > It is more difficult than you think. Heh. :) Thanks, -- Martin