Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3537965imm; Wed, 5 Sep 2018 01:39:27 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbaEcxXFrl9o8Ls8r055WMI6XKXogcMvZd/gR9BhzOl98FrXSfl3zyrbWmGugHerU3XHO++ X-Received: by 2002:a17:902:bc8b:: with SMTP id bb11-v6mr37002646plb.112.1536136767667; Wed, 05 Sep 2018 01:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536136767; cv=none; d=google.com; s=arc-20160816; b=naxZo77oeDEQIhluNv7N1vyD2GUqCBqrK6yeY3HlWpGKW78WK/PQEhGcB9eYrH3DbX 0cS9keoq1RdVFZEIjzSkGIb/xTe5CS+TNJL95EQR/JjqiBDqmEnJetScscmT3OGvcAyB FvhtB18TM0Mqy4jKXYdJO7AfMLHyfSOmU9uRa60h7F+b7jEUGNKwFuuLN4twqT7kRDFl C/lgAvIc7XWCHDI4+WivCDW27MHi2D3C0O/QfMmASg21jTKsA8jiBnKbiaz7fKZKoHPn iZ3oWrixm24/Zc2PUTxDjYy+dV5KJuRjPVJ0M9kXONb8kPTc1ONIwL26VtC21ZFi2260 J2qw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=zxlSGjdux2i6IgUjBbfJPsPiifmkQHS2tdUKZHgz66M=; b=laucj4o+5B+pIUZ0hGTLjyqy7LlhR1CnpgDIKFHpaH++g+1uQ8iYkodYd3PVGFjmav Hkz/KaH7TnTG7uZb0luFcLZ/dy9x/4HYhlBAgabA4zwMvKqNagvM0g5QNuGjY+qWvNAk FskIZ5OVC3oo1y734VDUt2c8QIby2+QHyasnVwDyfd6b6zC7w27A+1rURMCDFj0/2bQU 4lPVTgM9EFN8yinRVL+K6iFKZMV6Wc9HOb2aqFwsiFyyXZXD5YbJMouGO581RwMu9cEU 8Zo//6KGN1V++bF4IEFNxj6D3hlPGf/8paKAChIlkvsreEl9z7Kxkp+Ad6O9QIILP58H knOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hYrYsW3i; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y18-v6si1470095pfb.161.2018.09.05.01.39.12; Wed, 05 Sep 2018 01:39:27 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hYrYsW3i; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727981AbeIENGu (ORCPT + 99 others); Wed, 5 Sep 2018 09:06:50 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:39155 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727100AbeIENGu (ORCPT ); Wed, 5 Sep 2018 09:06:50 -0400 Received: by mail-oi0-f50.google.com with SMTP id c190-v6so12091485oig.6; Wed, 05 Sep 2018 01:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=zxlSGjdux2i6IgUjBbfJPsPiifmkQHS2tdUKZHgz66M=; b=hYrYsW3idi2dmHoVOQgsZyDIfa+QxYnJusxvzVmHS7QbnV7AEVFn0maaJOZdWCzE4T 3rXfeeOkQlUQ6p1QdFBFwXYv8UvXME3GSw301pZngVrVy+u5ldixFLQmLjUlqdJ+1aPo WHlGlDb/+sDTOL37rg3ryDBsEsZ6WXk7Hd69koIl914V7sRUwmff7FkYtK9PYqygrm9N Vdal297SRaXZwoASpL7Gt+dQglPtIxv3puQ2xWX+k1HFpSluqbHFqJAjEFpo0ls73H4B /E9E4cfyqXHBb/7NoP+FyxYyzi1KabbxHW9BGykBJZyQjNxBhq7rKJLUChPWRGRO18yn vptA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zxlSGjdux2i6IgUjBbfJPsPiifmkQHS2tdUKZHgz66M=; b=MlsTMmzetP07HI/UCFiOxhmHWPxGJAQGTYNfNwfEPmMd0b/NkKqD5fD4v3s5vr9AYT Q949re3ltOdiakPQGs9JANKbhZbZ8Zedv5iOt7UG46XUSJuyFTilHgha/vl5AqkOs+kg KleVB2LydMRKZfMMuYnU7fc07EsK8OxozlSzbpHE8PnwXcw71awRgPp77uniC/qUoMSe ELEaxRcYGynU7QL7uHIsIYtP3HHpAXhWWFaJeWKr/6ILVMqMMEM+8ByqBnmoxcFXYCE/ k0L7z1XaLdPZrzVk9RXAq/XlcTQSdxXk8RRXDdwZzBvq0mGj9yzp/H8kVc23k7VkVNf2 fpjQ== X-Gm-Message-State: APzg51B8WGLPh28v+NJG2m8GBWNI2KQh/FoqyfTIhyCed/jANdN00Kq1 3PL/sPgu10B77oHhNYWLcLADIxmLlGQWdl2mp0c+SLPNuLZHUQ== X-Received: by 2002:aca:aa06:: with SMTP id t6-v6mr30251522oie.152.1536136661732; Wed, 05 Sep 2018 01:37:41 -0700 (PDT) MIME-Version: 1.0 References: <20180905070847.GC24519@BitWizard.nl> <3805399.0d8HT3LL4o@merkaba> <20180905080444.GD24519@BitWizard.nl> In-Reply-To: <20180905080444.GD24519@BitWizard.nl> From: =?UTF-8?B?54Sm5pmT5Yas?= Date: Wed, 5 Sep 2018 16:37:30 +0800 Message-ID: Subject: Re: POSIX violation by writeback error To: R.E.Wolff@bitwizard.nl Cc: martin@lichtvoll.de, jlayton@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 5, 2018 at 4:04 PM Rogier Wolff wrote: > > 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 processo= r > > > 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 SMT= P > > once fsync() on the mail file completed successfully. And I=C2=B4d expe= ct > > every sensible MDA to do this. I don=C2=B4t know how Dovecot MDA which = I > > currently use for sieve support does this tough. > Is every implementation of mail editor really going to call fsync()? Why they are going to call fsync(), when fsync() is meant to persist the file on disk which is apparently unnecessary if the delivering to SMTP task won't start again after reboot? > 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. At this point, the /bin/sh may be partially old and partially new. Execute this corrupted bin is also dangerous though. > > 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.