Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13218ybl; Tue, 7 Jan 2020 13:08:21 -0800 (PST) X-Google-Smtp-Source: APXvYqzAtVmZFdOrqh9Gc3X1QWPmLOUn7FzTNK9ry6ocRxYPGvD8ia0oV9BuG2CW9zIxwgwuYTDW X-Received: by 2002:aca:72d0:: with SMTP id p199mr381691oic.40.1578431301056; Tue, 07 Jan 2020 13:08:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578431301; cv=none; d=google.com; s=arc-20160816; b=OePFyniM5rc5ph0KClnHIJHGdvaMgbvmzM6/3JAN8kOYjz0IjaDDpQ+AJM+JYuoFME eQnfLXklL6bfxwqQDGwYVo8rX+YtLiu+EpAyiaELpJDH2C0mEIQyEQmuT756OSwrzb+x GSQaPWsbwkp8ZXQqm6DdlYR+lXU5V83aeKKg5lT/x6eQ/3Kj0SryvhonJkfns9BETfwa BuG826dSSJoU21nyKCksFp86FG69Ez4CjO6J0ZtYdmNy0GD3vwPa+6sHmn+hAcawUVT0 8k46yLrlHHWbm8UaEPpTAaxWnjhdZcEn3SVG2QQIwSPu67KBy0uALTh/vUm39W4VNV3Q mqWw== 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:message-id:subject:cc :to:from:date; bh=qh6FUpAKIqulEjlLCMlf7jtd/JTfAFDZPByi0VkkOBI=; b=uGfeHA8kYb8JOt9/xi1iOMIRN2sNXWVnuCoRgT8PaTJsPJuiPlYXi/PnqF4AlEq4Hk 3xrk1nII6lnSiP60K+EcFVFtNSzgC35+d6WpXX0aGoOEwObsjhY7qcuppgBGYiKycigG F2rPEQhrYJlOJnwgLo5B76STgghLRAsI48+8bZXU4IF8ePHRgVcquOPqnYbWPJqLsPTb m0B1mcsOpr7pIYAzSgVBpcC+8OeNiWwyH+wZgDKKara57Q+Xhac3CxXNKj09eMN46bmv rEV17vP9KLnwQzwlGY9oD5C5TMq9E/8/0xgaBKTk5fmo2Siy4zwgj3ix92DRfLMOXVol 4H7Q== 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 a29si553786otd.268.2020.01.07.13.08.08; Tue, 07 Jan 2020 13:08:21 -0800 (PST) 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 S1729543AbgAGVH2 (ORCPT + 99 others); Tue, 7 Jan 2020 16:07:28 -0500 Received: from mail105.syd.optusnet.com.au ([211.29.132.249]:39024 "EHLO mail105.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729513AbgAGVHX (ORCPT ); Tue, 7 Jan 2020 16:07:23 -0500 Received: from dread.disaster.area (pa49-180-68-255.pa.nsw.optusnet.com.au [49.180.68.255]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 9EC533A3117; Wed, 8 Jan 2020 08:07:17 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1iow4J-0005jX-QL; Wed, 08 Jan 2020 08:07:15 +1100 Date: Wed, 8 Jan 2020 08:07:15 +1100 From: Dave Chinner To: Amir Goldstein Cc: Hugh Dickins , Chris Down , Linux MM , Andrew Morton , Al Viro , Matthew Wilcox , Jeff Layton , Johannes Weiner , Tejun Heo , linux-fsdevel , linux-kernel , kernel-team@fb.com Subject: Re: [PATCH v5 2/2] tmpfs: Support 64-bit inums per-sb Message-ID: <20200107210715.GQ23195@dread.disaster.area> References: <20200107001039.GM23195@dread.disaster.area> <20200107001643.GA485121@chrisdown.name> <20200107003944.GN23195@dread.disaster.area> 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) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=X6os11be c=1 sm=1 tr=0 a=sbdTpStuSq8iNQE8viVliQ==:117 a=sbdTpStuSq8iNQE8viVliQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=Jdjhy38mL1oA:10 a=1XWaLZrsAAAA:8 a=7-415B0cAAAA:8 a=qLVrV9dGIdnuQ3zi2hkA:9 a=jPg9kqVogik6UUPB:21 a=Tmguthn7wsSX_SwC:21 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 07, 2020 at 12:12:00PM +0200, Amir Goldstein wrote: > On Tue, Jan 7, 2020 at 10:36 AM Hugh Dickins wrote: > > > > On Tue, 7 Jan 2020, Amir Goldstein wrote: > > > On Tue, Jan 7, 2020 at 2:40 AM Dave Chinner wrote: > > > > On Tue, Jan 07, 2020 at 12:16:43AM +0000, Chris Down wrote: > > > > > Dave Chinner writes: > > > > > > It took 15 years for us to be able to essentially deprecate > > > > > > inode32 (inode64 is the default behaviour), and we were very happy > > > > > > to get that albatross off our necks. In reality, almost everything > > > > > > out there in the world handles 64 bit inodes correctly > > > > > > including 32 bit machines and 32bit binaries on 64 bit machines. > > > > > > And, IMNSHO, there no excuse these days for 32 bit binaries that > > > > > > don't using the *64() syscall variants directly and hence support > > > > > > 64 bit inodes correctlyi out of the box on all platforms. > > > > Interesting take on it. I'd all along imagined we would have to resort > > to a mount option for safety, but Dave is right that I was too focused on > > avoiding tmpfs regressions, without properly realizing that people were > > very unlikely to have written such tools for tmpfs in particular, but > > written them for all filesystems, and already encountered and fixed > > such EOVERFLOWs for other filesystems. > > > > Hmm, though how readily does XFS actually reach the high inos on > > ordinary users' systems? > > > > Define 'ordinary' > I my calculations are correct, with default mkfs.xfs any inode allocated > from logical offset > 2TB on a volume has high ino bits set. > Besides, a deployment with more than 4G inodes shouldn't be hard to find. You don't need to allocate 4 billion inodes to get >32bit inodes in XFS - the inode number is an encoding of the physical location of the inode in the filesystem. Hence we just have to allocate the inode at a disk address higher than 2TB into the device and we overflow 32bits. e.g. make a sparse fs image file of 10TB, mount it, create 50 subdirs, then start creating zero length files spread across the 50 separate subdirectories. You should see >32bit inode numbers almost immediately. (i.e. as soon as we allocate inodes in AG 2 or higher) IOWs, there are *lots* of 64bit inode numbers out there on XFS filesystems.... Cheers, Dave. -- Dave Chinner david@fromorbit.com