Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4196354ybv; Tue, 25 Feb 2020 15:14:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxJEtc7AKtNR9RSSzACTaZgi9pswD2J1Bk+zgZVB4aDl0w6cXWvRKsRzyaSx0kqNSO8vY6n X-Received: by 2002:a05:6830:1296:: with SMTP id z22mr740780otp.354.1582672491431; Tue, 25 Feb 2020 15:14:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582672491; cv=none; d=google.com; s=arc-20160816; b=mVTdVEIxqZclV/497Wq+w+H1TyRNkV+JQ/mnlbqkr+GV1tbrAp6qV7IEJ4/9+h5lkM XC1OawdHL/mQlH/6gNq8xpUYc8C+uGDv4tnRLFvOWcEDnxPjV+a10MMxpzcXHvwb0aPr GfEx88yi2WlwcmAj7T0wbfasj3jm+6bfJbFNEl3C5Nz0R9z2e4TvoK/a9gHFJ81H+Nx2 4L2a4mZUZjUoHEYyt5R86W8s3Sw4HOu94NP9lqsqC/5I80CEC4O+sJ7R2u5hNuRzeckd Fic0MTtgS5yoLO7agVmFRVvSdLhbFtg/UEQUu+yzcN5jrIVRssuvx4uPCD5inN8pnkwl HGwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=ik1zuiqE8i76YJubrnNTmer8KABpIWbp2agVMhEd0M4=; b=V6m2YDIWBroO3dhInhy1H1hsWXjZnPi8CHwsMyk2p1/j+GWiyESvmlwx4dASGzntO1 Y71t8bJaq1STzbzZKhfFKiOvq3eywzd/vmwtvqNi+OpYGJsqgXuPJfBolbTMBpWSqPbO M1tJvdoXXXnNFgI0n7l6sWfNOd1XCp+IJUJIkhRjQSd1T+tHjJ+tpT1FZTVXuTnr40rj 5mY0eQiELuiXAnVduWuwqN6JMZ57hr06B5gACj1iF/hOiAAdXBEhM2Cn758ssMqofH4R nAO0XW+/OuJrwB1Sak9TG2ZKUao63hvftB6oZIV1AFYLLhRc/cUN2R642GuNQPkX6650 lM0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mGnOqthE; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65si134047oif.14.2020.02.25.15.14.37; Tue, 25 Feb 2020 15:14:51 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=mGnOqthE; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728865AbgBYXOa (ORCPT + 99 others); Tue, 25 Feb 2020 18:14:30 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35854 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728989AbgBYXO3 (ORCPT ); Tue, 25 Feb 2020 18:14:29 -0500 Received: by mail-pf1-f194.google.com with SMTP id 185so390318pfv.3 for ; Tue, 25 Feb 2020 15:14:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=ik1zuiqE8i76YJubrnNTmer8KABpIWbp2agVMhEd0M4=; b=mGnOqthEowg2FBXNkXluMN/hRl1lQRj0tN9t5NB1i2gWmfosFiPkJONAvhfT1xHrpU oFKHf+ib2VqZgZN1/abWJvJ5NkBYY9WoXLPdrL45U4fjYYOF390hDPCIo0cwMj9846xy qb1tnlwKk8nzmFrJmtCs1aI5w/oJWQOhdTJb4L0Sv/zqZNUccZUWdoAFMVc61Xtizm0H THNvtbfv35/H2buOTn1Rtq1VkI/BbGTr6Jo15myWk9gRq4BEhEjRnEytFdJ6mue3jSfz L50sbyM4EuxkZKY0mm9oU8CcZyDzDRL8IvLxS+ejiqSOVUAOA+f1/c74w7XTKaooSDh1 VAog== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=ik1zuiqE8i76YJubrnNTmer8KABpIWbp2agVMhEd0M4=; b=WaENS0FK46hPz7U1+mXArNfZGtAn4mdJHIv6eR1YI/hTdHswDDE1+vtWdy2kCqdpAB VeEHpUQ8ivtPAJX8J1QWwDwd3wAmVNJId1gWZ612b9DabMW9eYFFB75vg6rLsJvTnr0C PjBvSs9Hust4zAy/u1K28GfA2r+KNFT5aI+k+JK6NDGgLuEH2NB0QBd0p3V89sOftxyr 45bWFQlt6wHWP62dGRbi5qwmgRzHht0ov3H9BLhr0L8BVPCYXa7VxqOhDvLtTau7i4uW X4J+eW5UxW3FhnxnVnjn/3qqJuV5TJZV9RjArwMkaupZ7Zps8I+I1vbLok4YM9jWPB55 cLlw== X-Gm-Message-State: APjAAAVQxRqWFb+WF/UlGfK4poj0gvPkHk+2mV3vx4vPbQxOLs7rdhtq 9f3p5Zn5I8xLkIX7JaHaOBukHA== X-Received: by 2002:a62:3892:: with SMTP id f140mr1097196pfa.190.1582672467127; Tue, 25 Feb 2020 15:14:27 -0800 (PST) Received: from [100.112.92.218] ([104.133.9.106]) by smtp.gmail.com with ESMTPSA id w8sm134400pfn.186.2020.02.25.15.14.25 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Feb 2020 15:14:26 -0800 (PST) Date: Tue, 25 Feb 2020 15:14:05 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Chris Down cc: Hugh Dickins , Dave Chinner , Chris Mason , Amir Goldstein , Linux MM , Andrew Morton , Al Viro , Matthew Wilcox , Jeff Layton , Johannes Weiner , Tejun Heo , Mikael Magnusson , linux-fsdevel , linux-kernel , Kernel Team Subject: Re: [PATCH v5 2/2] tmpfs: Support 64-bit inums per-sb In-Reply-To: <20200120151117.GA81113@chrisdown.name> Message-ID: References: <20200107001643.GA485121@chrisdown.name> <20200107003944.GN23195@dread.disaster.area> <20200107210715.GQ23195@dread.disaster.area> <4E9DF932-C46C-4331-B88D-6928D63B8267@fb.com> <20200110164503.GA1697@chrisdown.name> <20200120151117.GA81113@chrisdown.name> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Jan 2020, Chris Down wrote: > Hi Hugh, > > Sorry this response took so long, I had some non-work issues that took a lot > of time last week. No, clearly it's I who must apologize to you for very slow response. > > Hugh Dickins writes: > > > > So the "inode64" option will be accepted but redundant on mounting, > > but exists for use as a remount option after mounting or remounting > > with "inode32": allowing the admin to switch temporarily to mask off > > the high ino bits with "inode32" when needing to run a limited binary. > > > > Documentation and commit message to alert Andrew and Linus and distros > > that we are risking some breakage with this, but supplying the antidote > > (not breakage of any distros themselves, no doubt they're all good; > > but breakage of what some users might run on them). > > Sounds good. > > > > > > > Other than that, the first patch could be similar to how it is now, > > > incorporating Hugh's improvements to the first patch to put everything > > > under > > > the same stat_lock in shmem_reserve_inode. > > > > So, I persuaded Amir to the other aspects my version, but did not > > persuade you? Well, I can live with that (or if not, can send mods > > on top of yours): but please read again why I was uncomfortable with > > yours, to check that you still prefer it (I agree that your patch is > > simpler, and none of my discomfort decisive). > > Hmm, which bit were you thinking of? The lack of batching, shmem_encode_fh(), > or the fact that nr_inodes can now be 0 on non-internal mounts? I was uncomfortable with tmpfs depleting get_next_ino()'s pool in some configurations, and wanted the (get_next_ino-like) per-cpu but per-sb batching for nr_inodes=0, to minimize its stat_lock contention. I did not have a patch to shmem_encode_fh(), had gone through thinking that 64-bit inos made an additional fix there necessary; but Amir then educated us that it is safe as is, though could be cleaned up later. nr_inodes can be 0 on non-internal mounts, for many years. > > For batching, I'm neutral. I'm happy to use the approach from your patch and > integrate it (and credit you, of course). Credit not important, but you may well want to blame me for that complication :) > > For shmem_encode_fh, I'm not totally sure I understand the concern, if that's > what you mean. My concern had been that shmem_encode_fh() builds up an fh from i_ino and more, looks well prepared for a 64-bit ino, but appeared to be announcing a 32-bit ino in its return value: Amir reassures us that that return value does not matter. > > For nr_inodes, I agree that intentional or unintentional, we should at least > handle this case for now and can adjust later if the behaviour changes. nr_inodes=0 is an intentional configuration (but 0 denoting infinity: not very clean, and I've sometimes regretted that choice). If there's any behavior change, that's a separate matter from these 64-bit ino patches; maybe I mentioned it in passing and confused us - that we seem to have recently allowed a remounting limited<->unlimited that was not permitted before, and might or might not need a fix patch. Sorry again for delaying you, Chris: not at all what I'd wanted to do. Hugh