From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16147C433DB for ; Fri, 5 Feb 2021 21:23:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 898FD64FBA for ; Fri, 5 Feb 2021 21:23:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 898FD64FBA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 982C26B0006; Fri, 5 Feb 2021 16:23:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 934726B006C; Fri, 5 Feb 2021 16:23:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7AC5A6B006E; Fri, 5 Feb 2021 16:23:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0075.hostedemail.com [216.40.44.75]) by kanga.kvack.org (Postfix) with ESMTP id 5B0F06B0006 for ; Fri, 5 Feb 2021 16:23:16 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 20CBF2492 for ; Fri, 5 Feb 2021 21:23:16 +0000 (UTC) X-FDA: 77785489992.11.tax45_1503328275e8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id F328D180F8B80 for ; Fri, 5 Feb 2021 21:23:15 +0000 (UTC) X-HE-Tag: tax45_1503328275e8 X-Filterd-Recvd-Size: 3428 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Feb 2021 21:23:15 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 62EF764FBB; Fri, 5 Feb 2021 21:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1612560194; bh=kRHZZ1h7x0Pk7KF/tYHb3v57j2RpZMRpvK1byyUmgJg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MzobuA5zaLMYeNYL2TIiedzsv9DSS6n3wvB6ZeTBSejQDL5SK6YuCNEbEPa3itirl b06aLeEpIFLysSCaroHEdjZZJhLPtc7impfNYiz/2i0v5eG5V2R8ENTCc399D5dJ7g I/tG3RHfg97v98ZalHHEl9JTQLDFHRDc8B3OaJTg= Date: Fri, 5 Feb 2021 13:23:13 -0800 From: Andrew Morton To: Seth Forshee Cc: Hugh Dickins , Chris Down , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tmpfs: Don't use 64-bit inodes by defulat with 32-bit ino_t Message-Id: <20210205132313.95ce9fd932ca96667fd5db83@linux-foundation.org> In-Reply-To: References: <20210205202159.505612-1-seth.forshee@canonical.com> <20210205124157.c9d855a373362d7bf3d811a7@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 5 Feb 2021 14:55:43 -0600 Seth Forshee wrote: > On Fri, Feb 05, 2021 at 12:41:57PM -0800, Andrew Morton wrote: > > On Fri, 5 Feb 2021 14:21:59 -0600 Seth Forshee wrote: > > > > > Currently there seems to be an assumption in tmpfs that 64-bit > > > architectures also have a 64-bit ino_t. This is not true; s390 at > > > least has a 32-bit ino_t. With CONFIG_TMPFS_INODE64=y tmpfs > > > mounts will get 64-bit inode numbers and display "inode64" in the > > > mount options, but passing the "inode64" mount option will fail. > > > This leads to the following behavior: > > > > > > # mkdir mnt > > > # mount -t tmpfs nodev mnt > > > # mount -o remount,rw mnt > > > mount: /home/ubuntu/mnt: mount point not mounted or bad option. > > > > > > As mount sees "inode64" in the mount options and thus passes it > > > in the options for the remount. > > > > > > Ideally CONFIG_TMPFS_INODE64 would depend on sizeof(ino_t) < 8, > > > but I don't think it's possible to test for this (potentially > > > CONFIG_ARCH_HAS_64BIT_INO_T or similar could be added, but I'm > > > not sure whether or not that is wanted). So fix this by simply > > > refusing to honor the CONFIG_TMPFS_INODE64 setting when > > > sizeof(ino_t) < 8. > > > > How about changing s390 Kconfig so that CONFIG_TMPFS_INODE64 is not enabled? > > I did do that for our config. I see the s390 defconfig has it enabled, > so I will send a patch for that too. But the fact that it can be > configured that way and that the code behaves badly still seems > problematic. I meant --- a/fs/Kconfig~a +++ a/fs/Kconfig @@ -203,7 +203,7 @@ config TMPFS_XATTR config TMPFS_INODE64 bool "Use 64-bit ino_t by default in tmpfs" - depends on TMPFS && 64BIT + depends on TMPFS && 64BIT && !S390 default n help tmpfs has historically used only inode numbers as wide as an unsigned _