Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9078092rwp; Wed, 19 Jul 2023 22:11:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlFB/M5Z+uj+Mgp0O0PIss/0Lu500v3U0I4qdyFpY5Rxd5IRvGO+yy1a1gN2ty2YWoprCpTE X-Received: by 2002:a17:906:535d:b0:997:caf0:9945 with SMTP id j29-20020a170906535d00b00997caf09945mr1488035ejo.12.1689829895228; Wed, 19 Jul 2023 22:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689829895; cv=none; d=google.com; s=arc-20160816; b=xXESwlb+fPJ9Yn7FI60zj9BC0QEq1pbz+F8RtjMqCpUuE/BuyXNkr+NLp5+ScZmu44 2hsHYuBRS+o8blLkhqFLlIWKV9zsL3/ZPfbc9je4yEB1rlqzxRzJ530Wq/N5G935nQYt IBXkx+ey/t2pMjLys7ooOlouiZKSCLcIdJstnBUjBGvmt7QCT2eUgFERsRXTUsGOXBZt ARpJynIBZwtfw0o7o05FwwsRADmPc9Nelmh0Ks1vskf7Xoi1lZ/S95bZ2XKOGpvZlO+u B+gHkb5j76xSXeEHOqYtR9OoFhMBCOm9SNCdu8U3n2LvbuoBcW7mkfnuSYXTvhTFifSp Yz3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WDkuzsGfOvgmcwkIftU4ohf8YDiv8w29EGl2vrbIwtc=; fh=CvaNctjYOkmtwUc2GtiNVMlGGnqrLAdcTfsvogreoMc=; b=JAnB07lUUSJDcQ4AkVXakhH+8uQ64nQfyRO5u9HatQnuryteDRo9skeoAS83tnhQOd t09nUJeVITIlIeAu7IftRgWLmm+dzeXGJx6RZfWUYJ+S1aj3uVe1af+QPduTwZ7zovRF MpYPPVjrimg5IWdemohpcmHgKGQDl6ZjTJGJKoQEmzvwuHc7oAX+vkvo5L1PapsCTO1y 73C2+ARKTcw0JesMOi3V0qENOg+WAT93C3ovqBshvV8f5ojOknIS9res5wtvHvBBnigE dw5PuHKZAs/FZtZMjLRa6EKazgYJgcJH468SHq7pUbI0C7cYwzO5ijeuZJLnbBHmmjtb KUmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=lm4z5U3h; spf=pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-embedded-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h13-20020a17090619cd00b00992e22a640csi126122ejd.547.2023.07.19.22.11.23; Wed, 19 Jul 2023 22:11:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=lm4z5U3h; spf=pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-embedded-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229587AbjGTElg (ORCPT + 36 others); Thu, 20 Jul 2023 00:41:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjGTElf (ORCPT ); Thu, 20 Jul 2023 00:41:35 -0400 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 472E41998 for ; Wed, 19 Jul 2023 21:41:33 -0700 (PDT) Received: from cwcc.thunk.org (pool-173-48-116-181.bstnma.fios.verizon.net [173.48.116.181]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 36K4fK8T018002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jul 2023 00:41:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1689828082; bh=WDkuzsGfOvgmcwkIftU4ohf8YDiv8w29EGl2vrbIwtc=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=lm4z5U3hUf4M4K+hUJVD3HeEgIgziEjlSeT2rYFQzPcGb+LWoSBd127vHYZDb7Dax Wj8KZNtIPtaKLz/AyfwKcWBDlgSaIwsVwFRyvFuogCnUrDKTH5zYmVgvMew2ablErc J8B2VvKNbQx0HVwLAIHloX/L7Hfvsn0Ab5J6gRX/siZphLTi677yegCcKmV784SXPj tRecXeA5hZVzQl0fkXhni+vbIvb2xaumo1eF4lJgJ4nUq6cLBsDnr+3blmAgRBGZyL R3Peux0rUpfUunywAPKdP1WAEN02osN0N1zpPzvnVplAsI2zZbb0o33cW/UfyrZBa4 N9aenpL3D8+YQ== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 9728615C026A; Thu, 20 Jul 2023 00:41:20 -0400 (EDT) Date: Thu, 20 Jul 2023 00:41:20 -0400 From: "Theodore Ts'o" To: Kai Tomerius Cc: "Alan C. Assis" , =?iso-8859-1?Q?Bj=F8rn?= Forsman , linux-embedded@vger.kernel.org, Ext4 Developers List , dm-devel@redhat.com Subject: Re: File system robustness Message-ID: <20230720044120.GB5764@mit.edu> References: <20230717075035.GA9549@tomerius.de> <20230718053017.GB6042@tomerius.de> <20230718213212.GE3842864@mit.edu> <20230719105138.GA19936@tomerius.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230719105138.GA19936@tomerius.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-embedded@vger.kernel.org On Wed, Jul 19, 2023 at 12:51:39PM +0200, Kai Tomerius wrote: > > In answer to Kai's original question, the setup that was described > > should be fine --- assuming high quality hardware. > > I wonder how to judge that ... it's an eMMC supposedly complying to > some JEDEC standard, so it *should* be ok. JEDEC promulgates the eMMC interface specification. That's the interface used to talk to the device, much like SATA and SCSI and NVMe. The JEDEC eMMC specification says nothing about the quality of the implementation of the FTL, or whether it is safe from power drops, or how many wirte cycles are supported before the eMMC soldered on the $2000 MCU would expire. If you're a cell phone manufacturer, the way you judge it is *before* you buy a few million of the eMMC devices, you subject the samples to a huge amount of power drops and other torture tests (including verifying the claimed number of write cycles in spec sheet), before the device is qualified for use in your product. > But on another aspect: how about the interaction between dm-integrity > and ext4? Sure, they each have their own journal, and they're > independent layers. Is there anything that could go wrong, say a block > that can't be recovered in the dm-integrity layer, causing ext4 to run > into trouble, e.g., an I/O error that prevents ext4 from mounting? > > I assume tne answer is "No", but can I be sure? If there are I/O errors, with or without dm-integrity, you can have problems. dm-integrity will turn bit-flips into hard I/O errors, but a bit-flip might cause silent file system cocrruption (at least at first), such that when you finally notice that there's a problem, several days or weeks or months may have passed, the data loss might be far worse. So turning an innocous bit flip into a hard I/O error can be a feature, assuming that you've allowed for it in your system architecture. If you assume that the hardware doesn't introduce I/O errors or bit flips, and if you assume you don't have any attackers trying to corrupt the block device with bit flips, then sure, nothing will go wrong. You can buy perfect hardware from the same supply store where high school physics teachers buy frictionless pulleys and massless ropes. :-) Cheers, - Ted