Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3511143imm; Wed, 5 Sep 2018 01:06:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZkAhGsoMe++WRTcaB69m8MX4FLt+RvtoGQRcf2rhY6D7h/QHwMUlMFRO7umEtZrQ34Pt7c X-Received: by 2002:a17:902:6bc5:: with SMTP id m5-v6mr36839109plt.274.1536134766969; Wed, 05 Sep 2018 01:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536134766; cv=none; d=google.com; s=arc-20160816; b=07ZbbXAwwDMl7DTQnyWcnxWMikCjZWiyi4ENq+6YrQylhGTzx9HjzaxXKUdMH2RI6A umfSoQ3FV3QpuGuZ8WyEyl77kF0TFAOuUzW33v5JTQh0pEfHM4WvXW8DWXQBPpH9+BmW CEk/LOBorv+t2RuqfUTWqbzNMoasVwMWv17Sa1PSiCTHQr4nApzhLctGXe6g9KyJMI86 i2jAwgVrMv8PfwTUUV3u2r/AEIlJkNeywJ8fTUWlbRYkfxQdkXCIs621HQdcJHPb1JTl Gf4s0+C5yfkm4TZ9ZyS4H0cdGaBSx2t1LVV9IPsoNgwhrh4BNBl5uvm07bxBhv2iK89C USLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=bEPJhcOFn9QpGGUflpWQ6kvY3PgguMXUeQxVfW2hsFA=; b=K3DxPAW4OGjt8EDWfw2hKI5eotsjMaV/+hReMzIxy36dgyuVanClDda95KK8BtrLLi Z8uedI+iHUsN5Os3DBiG5IVI/roOpztTxGj4G0VV6wDrMioh/3yVfsQn7ACUOj2eGZLt w/OtiwXhE6vmmxk2AM2IFdkA85DxL/Aetqwi4r4EWpe26mqva8pR6NrN2uYmLogUGtHc OoLc/e8Dkg4FQ8LkN3IPN1QuaVWx4O0RdqN9CA+pBcsWBgpUldmg+3t59utIAoiSq7pi Z/zM3FQRNVJVSa7amemwsr+b9LlhkcM94Dm+bBFMfb7vuB3gqNGypFv1uZXgheFxLqlJ Gj+Q== 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 k193-v6si1229652pge.4.2018.09.05.01.05.51; Wed, 05 Sep 2018 01:06:06 -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 S1727636AbeIEMdq (ORCPT + 99 others); Wed, 5 Sep 2018 08:33:46 -0400 Received: from cust-95-128-94-82.breedbanddelft.nl ([95.128.94.82]:45756 "EHLO cust-95-128-94-82.breedbanddelft.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbeIEMdq (ORCPT ); Wed, 5 Sep 2018 08:33:46 -0400 Received: by abra2.bitwizard.nl (Postfix, from userid 1000) id 3B23013FC8F; Wed, 5 Sep 2018 10:04:45 +0200 (CEST) Date: Wed, 5 Sep 2018 10:04:45 +0200 From: Rogier Wolff To: Martin Steigerwald Cc: Jeff Layton , =?utf-8?B?54Sm5pmT5Yas?= , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: POSIX violation by writeback error Message-ID: <20180905080444.GD24519@BitWizard.nl> References: <20180905070847.GC24519@BitWizard.nl> <3805399.0d8HT3LL4o@merkaba> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3805399.0d8HT3LL4o@merkaba> Organization: BitWizard B.V. User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); I know of an application somewhere that does realtime-gathering of call-records (number X called Y for Z seconds). They come in from a variety of sources, get de-duplicated standardized and written to files. Then different output modules push the data to the different consumers within the company. Billing among them. Now getting old data there would be pretty bad. And calling fsync all the time might have performance issues.... That's the situation where "old data is really bad". But when apt-get upgrade replaces your /bin/sh and gets a write error returning error on subsequent reads is really bad. It is more difficult than you think. Roger. -- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** *-- BitWizard writes Linux device drivers for any device you may have! --* The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work.