Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp1218063ybh; Sat, 3 Aug 2019 20:53:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKnqeohJEX4Efjx794o0teBJwYdsGlzdvb8ZdCAG88mHfH9xCDluCNrMn/s6XADjVQdlOf X-Received: by 2002:a63:1908:: with SMTP id z8mr127633234pgl.433.1564890807630; Sat, 03 Aug 2019 20:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564890807; cv=none; d=google.com; s=arc-20160816; b=mzmCGF7obwkEnwbd88E4on+BAcq6XXc7uN4bI+Z/Ba3zl1BX/mpPfxXC7dFUpEMhBM IVL2Rowchhhc6FYw9Gvh5TozxKVeApnxbXXFmsqCx/1vJIiRrSw3uBwwBdeQ4mFnG9di 77leZJFUgsKBtHAWnWvkxFMkz9eYbVSV6dBPBQ34/4bcuq3IPmVCb3Wm0OJfLtMGcTvH 39B2hOHKtJfszFEreZQvoSNJZlpmMNo32bkAZ8BEszdbTSmHN1sqaTWZeXnTdSSquN7i Fnj7hVSpJ+um+4um9er6nZMJh83aqn3OWInSOjBdFNCvuBb3OE/Gpk4FLBlvePrxuC0d v5mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=bmWXR+sqDkDN4GHhCxv5sFg0duu5w3GBu66DEJQRQrs=; b=TANzhzXPWwERyb8g6W1nL37LKZPUCURNiwbSYvmosvuWfhkNFLXYUQdWxGkjVqR+JV eLKfnOpDzRHeYdFUQ7lJjdq4L2pHLwJho+LRz7kY2aDylTWGKxY+/AFAnE8vvLTZ9ouA 2H51CXK7bmwscssd18T8vNRGzojArRKFqLG62JPWzaifs2RCgYUPzeS9P5LAIzsw4zdz Afy2hKT1csQoooZcOJlV58A+50v24EzidMALLFZNy7UZ6wK12g9KsA5ON3dlSpxnISUZ SjTg4inL9o1SmI1t62TDDri5IIAtlOue+A6DWcyCFXCPnSzJezGSjhVoi1zj6yjg/ETG C61g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 t14si2397497pgk.508.2019.08.03.20.53.11; Sat, 03 Aug 2019 20:53:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387683AbfHCQDR (ORCPT + 99 others); Sat, 3 Aug 2019 12:03:17 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:50491 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387464AbfHCQDR (ORCPT ); Sat, 3 Aug 2019 12:03:17 -0400 Received: from callcc.thunk.org ([199.116.115.135]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x73G2wIF010152 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 3 Aug 2019 12:03:00 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id DE3914202F5; Sat, 3 Aug 2019 12:02:57 -0400 (EDT) Date: Sat, 3 Aug 2019 12:02:57 -0400 From: "Theodore Y. Ts'o" To: Arnd Bergmann Cc: Deepa Dinamani , "Darrick J. Wong" , Alexander Viro , Linux Kernel Mailing List , Linux FS-devel Mailing List , y2038 Mailman List , Andreas Dilger , Ext4 Developers List Subject: Re: [PATCH 09/20] ext4: Initialize timestamps limits Message-ID: <20190803160257.GG4308@mit.edu> Mail-Followup-To: "Theodore Y. Ts'o" , Arnd Bergmann , Deepa Dinamani , "Darrick J. Wong" , Alexander Viro , Linux Kernel Mailing List , Linux FS-devel Mailing List , y2038 Mailman List , Andreas Dilger , Ext4 Developers List References: <20190730014924.2193-1-deepa.kernel@gmail.com> <20190730014924.2193-10-deepa.kernel@gmail.com> <20190731152609.GB7077@magnolia> <20190801224344.GC17372@mit.edu> <20190802154341.GB4308@mit.edu> <20190802213944.GE4308@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sat, Aug 03, 2019 at 11:30:22AM +0200, Arnd Bergmann wrote: > > I see in the ext4 code that we always try to expand i_extra_size > to s_want_extra_isize in ext4_mark_inode_dirty(), and that > s_want_extra_isize is always at least s_min_extra_isize, so > we constantly try to expand the inode to fit. Yes, we *try*. But we may not succeed. There may actually be a problem here if the cause is due to there simply is no space in the external xattr block, so we might try and try every time we try to modify that inode, and it would be a performance mess. If it's due to there being no room in the current transaction, then it's highly likely it will succeed the next time. > Did older versions of ext4 or ext3 ignore s_min_extra_isize > when creating inodes despite > EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE, > or is there another possibility I'm missing? s_min_extra_isize could get changed in order to make room for some new file system feature --- such as extended timestamps. That's how we might take an old ext3 file system with an inode size > 128, and try to evacuate space for extended timestamps, on a best efforts basis. And since it's best efforts is why Red Hat refuses to support that case. It'll work 99.9% of the time, but they don't want to deal with the 0.01% cases showing up at their help desk. If you want to pretend that file systems never get upgraded, then life is much simpler. The general approach is that for less-sophisticated customers (e.g., most people running enterprise distros) file system upgrades are not a thing. But for sophisticated users, we do try to make thing work for people who are aware of the risks / caveats / rough edges. Google won't have been able to upgrade thousands and thousands of servers in data centers all over the world if we limited ourselves to Red Hat's support restrictions. Backup / reformat / restore really isn't a practical rollout strategy for many exabytes of file systems. It sounds like your safety checks / warnings are mostly targeted at low-information customers, no? - Ted