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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 17468C433E6 for ; Mon, 22 Feb 2021 00:20:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC6EA64ED6 for ; Mon, 22 Feb 2021 00:20:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbhBVAUS (ORCPT ); Sun, 21 Feb 2021 19:20:18 -0500 Received: from mail109.syd.optusnet.com.au ([211.29.132.80]:32782 "EHLO mail109.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229998AbhBVAUR (ORCPT ); Sun, 21 Feb 2021 19:20:17 -0500 Received: from dread.disaster.area (pa49-179-130-210.pa.nsw.optusnet.com.au [49.179.130.210]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 7A2C1FA99D4; Mon, 22 Feb 2021 11:19:31 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1lDywk-00FroM-Qj; Mon, 22 Feb 2021 11:19:30 +1100 Date: Mon, 22 Feb 2021 11:19:30 +1100 From: Dave Chinner To: Qu Wenruo Cc: Theodore Ts'o , Matthew Wilcox , Linux FS Devel , "linux-btrfs@vger.kernel.org" Subject: Re: page->index limitation on 32bit system? Message-ID: <20210222001930.GA4626@dread.disaster.area> References: <1783f16d-7a28-80e6-4c32-fdf19b705ed0@gmx.com> <20210218121503.GQ2858050@casper.infradead.org> <20210218133954.GR2858050@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=YKPhNiOx c=1 sm=1 tr=0 cx=a_idp_d a=JD06eNgDs9tuHP7JIKoLzw==:117 a=JD06eNgDs9tuHP7JIKoLzw==:17 a=IkcTkHD0fZMA:10 a=qa6Q16uM49sA:10 a=7-415B0cAAAA:8 a=4nK5NWoZmdbISTPU9iQA:9 a=QEXdDO2ut3YA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Sat, Feb 20, 2021 at 07:10:14AM +0800, Qu Wenruo wrote: > > > On 2021/2/20 上午12:12, Theodore Ts'o wrote: > > On Fri, Feb 19, 2021 at 08:37:30AM +0800, Qu Wenruo wrote: > > > So it means the 32bit archs are already 2nd tier targets for at least > > > upstream linux kernel? > > > > At least as far as btrfs is concerned, anyway.... > > I'm afraid that would be the case. > > But I'm still interested in how other fses handle such problem. Refuse to mount >16TB on 32 bit, 4kB page systems. And set the max file offset for such systems to 16TB so sparse files can't be larger than what the kernel supports. See xfs_sb_validate_fsb_count() call and the file offset checks against MAX_LFS_FILESIZE in xfs_fs_fill_super()... FWIW, XFS has been doing this for roughly 20 years now - >16TB on 32 bit machines was an issue for XFS way back at the turn of the century... Cheers, Dave. -- Dave Chinner david@fromorbit.com