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=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, 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 7DD49C433E0 for ; Fri, 5 Feb 2021 20:55:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DCDE664FB0 for ; Fri, 5 Feb 2021 20:55:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCDE664FB0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 49B6D6B0006; Fri, 5 Feb 2021 15:55:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44BFF6B006C; Fri, 5 Feb 2021 15:55:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33A936B006E; Fri, 5 Feb 2021 15:55:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0033.hostedemail.com [216.40.44.33]) by kanga.kvack.org (Postfix) with ESMTP id 1A6566B0006 for ; Fri, 5 Feb 2021 15:55:48 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C955A181AEF09 for ; Fri, 5 Feb 2021 20:55:47 +0000 (UTC) X-FDA: 77785420734.26.car03_160463e275e7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id A9C0B1804B66E for ; Fri, 5 Feb 2021 20:55:47 +0000 (UTC) X-HE-Tag: car03_160463e275e7 X-Filterd-Recvd-Size: 4512 Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Feb 2021 20:55:47 +0000 (UTC) Received: from mail-oi1-f198.google.com ([209.85.167.198]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l888n-00008f-MY for linux-mm@kvack.org; Fri, 05 Feb 2021 20:55:45 +0000 Received: by mail-oi1-f198.google.com with SMTP id d84so2080223oig.6 for ; Fri, 05 Feb 2021 12:55:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=QkkmoEPfz/PvJc6Yd3AdkXaGpIKT6BSjX72ihLgbl6M=; b=hHPnjOs1jbK9dfRC3F+Xkbo431hvjS6X6N9ajiCMNNGSJpcAvHQXGr5yLJFj/74d/b fJVhkF6DpjUxBHQLk79NKsYzyf886zJxrsE7r5LcHWcgFgLaiqXUmSCOLwCV2KMBen/y UOKA0A2VstDWLeQam9LHSsZXVW2YOKasQFmMr4ttapOBf+7utKzFfLIb9yedJq7rJrLl bpLZdixTdOWeZ67rubAsbsiWqLf5zG4xtxk242bya+9d0aoDUOOTtLO4ZaMWoWeTREBc aSB5qqdkz7DDU9YVORFJg1vOnNOZHzMpGyh3iJN0KbbEoQkwiMccCoesZ64voZqkSnzW 5GDg== X-Gm-Message-State: AOAM533DmDKEVZtEJAJQQhD+i1upN9qT3SWHqFiMdSBgF+aS0fRySdCX KVE8rom0YkLWhx8BgcX0c/mEXxi9qR1tfOiDEvy+NcqnXVvtXWa21Nm0apDamAuiEZU4urMHgOt mA09LUQXg8L1tusIjmLPe0qy6e7kN X-Received: by 2002:a9d:5f12:: with SMTP id f18mr4748999oti.282.1612558544677; Fri, 05 Feb 2021 12:55:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0tPym7+CLOVDwIItrIhMQpOrUvHBE2Npnq1Ypg8kVSSI4F4SVRY3hpqbOBjAH9Y+o3jUn9A== X-Received: by 2002:a9d:5f12:: with SMTP id f18mr4748993oti.282.1612558544479; Fri, 05 Feb 2021 12:55:44 -0800 (PST) Received: from localhost ([2605:a601:ac0f:820:2b7:eb67:ff8d:8b15]) by smtp.gmail.com with ESMTPSA id r1sm2025770ooq.16.2021.02.05.12.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 12:55:43 -0800 (PST) Date: Fri, 5 Feb 2021 14:55:43 -0600 From: Seth Forshee To: Andrew Morton 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: References: <20210205202159.505612-1-seth.forshee@canonical.com> <20210205124157.c9d855a373362d7bf3d811a7@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210205124157.c9d855a373362d7bf3d811a7@linux-foundation.org> 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, 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. > > > Fixes: ea3271f7196c ("tmpfs: support 64-bit inums per-sb") > > Signed-off-by: Seth Forshee > > With a cc:stable, I assume? Yes, I forgot that. Thanks. Seth