Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3766326imm; Wed, 5 Sep 2018 05:48:40 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZpStuzwdAOFeKwaDbfnLBkF3C9AZMcyNIFalFCeCn5GDLLhexYrAOd0x87w5IzLxXWB9Me X-Received: by 2002:a63:65c2:: with SMTP id z185-v6mr36242758pgb.276.1536151720912; Wed, 05 Sep 2018 05:48:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536151720; cv=none; d=google.com; s=arc-20160816; b=XLxsearwJHAfCZSRnv1N20QRdnD9a3dqb9+HRDKRkjgQaNGf6kB8JBAPhKr8+EH549 9ChlEqmbgFroJIrHhYnj8jqvesaOEP8o5RtbVMkME0haqtvnDZi80+YGhOd6ZfEsYRn9 3z+soOV2mJiz8JP2N+yCEEOStQ0ohFYrEmVlaGUFN2joNvsSX1jZSQ2OfgoH4ZCdtR7K l+f5QmjfXh4BaCi7+lf9eBHcOjboE5tgD2baa7e0zrsEBgjs1DfdFwvSOPaiL9vvQxxq uwHyLF1pBMRNzlmvYEVWazCJxv+HEh60sunHklQZJhxaKRQvW5cMrBMMcyekPWoUitPy WT7w== 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=T1b1AYJ6Tm3jyJMne0ZbYKtASYWMFgUOFtIr+tb/faY=; b=BzMRcgevayhr0aU3qf3PLDhSZGe6+6vbU5rh1QRg6aWh/h5KPlCT98yp5lvQSAl9Zn AuzthYm/SPCCxe7TF4WI8lpII/2zn4e/PBk9ZtvXK+EC2/JqsUEBPuS/4Os+deTI+zcN 2LmFUeVptvfHV0BvuNFvUg0byCOHDjVrvlo0Ejjh0aPUdc8RBzIbuFGHUo6jAxrHEfEX VN9ghcleyJuBVfn3Oi9dvWuPpmHyuc8raMwXTROgIQiWSC3lOTJTQPSY1g8iQ2kks2QR 70MCSBXZ2FLL1q+2kgmSC5mMU8cljIhy0uSwYlxWSdzOp3LCTXF3twtg2mhkoujVXkcR gbKw== 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 e12-v6si1681374pls.372.2018.09.05.05.48.24; Wed, 05 Sep 2018 05:48:40 -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 S1727665AbeIERQz (ORCPT + 99 others); Wed, 5 Sep 2018 13:16:55 -0400 Received: from cust-95-128-94-82.breedbanddelft.nl ([95.128.94.82]:51660 "EHLO cust-95-128-94-82.breedbanddelft.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725890AbeIERQz (ORCPT ); Wed, 5 Sep 2018 13:16:55 -0400 Received: by abra2.bitwizard.nl (Postfix, from userid 1000) id A38BD13F6ED; Wed, 5 Sep 2018 14:46:46 +0200 (CEST) Date: Wed, 5 Sep 2018 14:46:46 +0200 From: Rogier Wolff To: "Austin S. Hemmelgarn" Cc: =?utf-8?B?54Sm5pmT5Yas?= , martin@lichtvoll.de, jlayton@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: POSIX violation by writeback error Message-ID: <20180905124646.GR17123@BitWizard.nl> References: <20180905070847.GC24519@BitWizard.nl> <3805399.0d8HT3LL4o@merkaba> <20180905080444.GD24519@BitWizard.nl> <1b02ddae-35ae-8ff7-760f-bc9bafee4541@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1b02ddae-35ae-8ff7-760f-bc9bafee4541@gmail.com> 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 08:07:25AM -0400, Austin S. Hemmelgarn wrote: > On 2018-09-05 04:37, 焦晓冬 wrote: > >At this point, the /bin/sh may be partially old and partially new. Execute > >this corrupted bin is also dangerous though. > But the system may still be usable in that state, while returning an > error there guarantees it isn't. This is, in general, not the best > example though, because no sane package manager directly overwrites > _anything_, they all do some variation on replace-by-rename and call > fsync _before_ renaming, so this situation is not realistically > going to happen on any real system. Again, the "returning an error guarantees it isn't" is what's important here. A lot of scenarios exist where it is a slightly less important file than "/bin/sh" that would trigger such a comiplete system failure. But there are a whole lot of files that can be pretty critical for a system where "old value" is better than "all programs get an error now". So when you propose "reads should now return error", you really need to think things through. It is not enough to say: But I encountered a situation where returning an error was preferable, you need to think through the counter-cases that others might run into that would make the "new" situation worse than before. 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.